summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-08-11 19:51:43 +0200
committerEndi S. Dewata <edewata@redhat.com>2016-04-05 22:41:44 +0200
commit28983827e01ddff0a5184b54383d02a31a53f085 (patch)
tree4464222e5f59a109e755e1820a05638a900d403d
parent47e022347d71526ed284cad10d67bfe24d2eeb1b (diff)
downloadpki-28983827e01ddff0a5184b54383d02a31a53f085.tar.gz
pki-28983827e01ddff0a5184b54383d02a31a53f085.tar.xz
pki-28983827e01ddff0a5184b54383d02a31a53f085.zip
Move pylint-build-scan.py to scripts directory
Move internal helper and its configuration out of the project's root directory into scripts/. Also use re instead of fnmatch to find the upgrade scriptlets.
-rw-r--r--scripts/compose_functions2
-rw-r--r--scripts/dogtag.pylintrc (renamed from dogtag.pylintrc)0
-rw-r--r--setup.py6
-rw-r--r--tox.ini19
4 files changed, 14 insertions, 13 deletions
diff --git a/scripts/compose_functions b/scripts/compose_functions
index 14dd96572..c4ae173e4 100644
--- a/scripts/compose_functions
+++ b/scripts/compose_functions
@@ -42,7 +42,7 @@ export PKI_DOGTAG_DIR
PKI_REDHAT_DIR="${PKI_DIR}/redhat"
export PKI_REDHAT_DIR
-PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake pylint-build-scan.sh dogtag.pylintrc"
+PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake scripts/pylint-build-scan.py scripts/dogtag.pylintrc"
export PKI_FILE_LIST
PKI_CMAKE_DIR="cmake"
diff --git a/dogtag.pylintrc b/scripts/dogtag.pylintrc
index 3ffb1ab71..3ffb1ab71 100644
--- a/dogtag.pylintrc
+++ b/scripts/dogtag.pylintrc
diff --git a/setup.py b/setup.py
index e14c7f8d4..3b808a384 100644
--- a/setup.py
+++ b/setup.py
@@ -19,15 +19,17 @@
#
import os
-from fnmatch import fnmatch
+import re
from distutils.core import setup
+UPGRADE_SCRIPT = re.compile('^[0-9]+-.*')
+
def find_upgrade(origroot, destroot):
upgrades = {}
for dirpath, dirnames, filenames in os.walk(origroot):
for filename in filenames:
- if fnmatch(filename, '[0-9][0-9]-*'):
+ if UPGRADE_SCRIPT.match(filename):
version = os.path.basename(dirpath)
orig = os.path.join(dirpath, filename)
dest = os.path.join(destroot, version)
diff --git a/tox.ini b/tox.ini
index 54ff3b873..85a7f9b00 100644
--- a/tox.ini
+++ b/tox.ini
@@ -44,16 +44,15 @@ sitepackages = True
deps =
pylint
commands =
- pylint \
- {envsitepackagesdir}/pki \
- {envbindir}/pkidestroy \
- {envbindir}/pkispawn \
- {envbindir}/pki-server \
- {envbindir}/pki-server-upgrade \
- {envbindir}/pki-upgrade \
- {envbindir}/pki \
- --rcfile={toxinidir}/dogtag.pylintrc \
- {posargs}
+ {envpython} {toxinidir}/scripts/pylint-build-scan.py tox
+
+[testenv:lint3k]
+basepython = python2.7
+sitepackages = True
+deps =
+ pylint
+commands =
+ {envpython} {toxinidir}/scripts/pylint-build-scan.py tox -- --py3k
[testenv:pep8]
basepython = python2.7