summaryrefslogtreecommitdiffstats
path: root/setup.py
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 /setup.py
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.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
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)