Fix rewheel's module regex (related upstream issue27364 and issue28128).

Enable tests.
This commit is contained in:
Charalampos Stratakis 2016-10-12 14:04:47 +02:00
parent 062c68f056
commit ace4eac581
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ diff -Nur Python-3.4.1/Lib/ensurepip/rewheel/__init__.py Python-3.4.1-rewheel/Li
+ for project in projects: + for project in projects:
+ path = None + path = None
+ for sp in sys_sitepack: + for sp in sys_sitepack:
+ dist_info_re = os.path.join(sp, project) + '-[^\{0}]+\.dist-info'.format(os.sep) + dist_info_re = os.path.join(sp, project) + r'-[^\{0}]+\.dist-info'.format(os.sep)
+ candidates = [os.path.join(sp, p) for p in os.listdir(sp)] + candidates = [os.path.join(sp, p) for p in os.listdir(sp)]
+ # filter out candidate dirs based on the above regexp + # filter out candidate dirs based on the above regexp
+ filtered = [c for c in candidates if re.match(dist_info_re, c)] + filtered = [c for c in candidates if re.match(dist_info_re, c)]

View File

@ -87,7 +87,7 @@
%global with_computed_gotos yes %global with_computed_gotos yes
# Turn this to 0 to turn off the "check" phase: # Turn this to 0 to turn off the "check" phase:
%global run_selftest_suite 0 %global run_selftest_suite 1
# We want to byte-compile the .py files within the packages using the new # We want to byte-compile the .py files within the packages using the new
# python3 binary. # python3 binary.