summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
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)