Permalink
Browse files

Use the presence of `builtins` rather than `configparser` to indicate…

… the future/src folder
  • Loading branch information...
1 parent 5cbeb4b commit d25f4f8f8e13fd1d5cf959c24e4a4b50520c0590 @edschofield edschofield committed Oct 27, 2016
Showing with 6 additions and 2 deletions.
  1. +3 −1 setup.py
  2. +3 −1 src/future/standard_library/__init__.py
View
@@ -135,7 +135,9 @@
'_markupbase',
'_thread',
'builtins',
- # 'configparser',
+ # Catch the case that configparser is in the build folder
+ # from a previous version of `future`:
+ 'configparser',
'copyreg',
'html',
'http',
@@ -755,7 +755,9 @@ def __enter__(self):
self.old_sys_modules = copy.copy(sys.modules)
if sys.version_info[0] < 3:
return
- FUTURE_SOURCE_SUBFOLDERS = ['future', 'past', 'libfuturize', 'configparser']
+ # The presence of all these indicates we've found our source folder,
+ # because `builtins` won't have been installed in site-packages by setup.py:
+ FUTURE_SOURCE_SUBFOLDERS = ['future', 'past', 'libfuturize', 'libpasteurize', 'builtins']
# Look for the future source folder:
for folder in self.old_sys_path:

0 comments on commit d25f4f8

Please sign in to comment.