diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-24 18:26:47 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-24 18:26:47 -0700 |
commit | d0d8d1c1deb28fb2b43c7180cd0e293608b6964e (patch) | |
tree | d5537fcc08460d6a73833655c490ff7cc305ef60 /setup.py | |
parent | ee19043127784e579a45ceb2f02ff350ec8b6019 (diff) | |
parent | d6f62682483448adc8724345bad42a4740710a48 (diff) | |
download | numpy-d0d8d1c1deb28fb2b43c7180cd0e293608b6964e.tar.gz |
Merge pull request #3266 from charris/2to3-remove-2to3-fixer
2to3 remove 2to3 fixer
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 29 |
1 files changed, 1 insertions, 28 deletions
@@ -154,34 +154,7 @@ def configuration(parent_package='',top_path=None): def setup_package(): - # Perform 2to3 if needed - local_path = os.path.dirname(os.path.abspath(sys.argv[0])) - src_path = local_path - - if sys.version_info[0] == 3: - src_path = os.path.join(local_path, 'build', 'py3k') - sys.path.insert(0, os.path.join(local_path, 'tools')) - import py3tool - print("Converting to Python3 via 2to3...") - py3tool.sync_2to3('numpy', os.path.join(src_path, 'numpy')) - - site_cfg = os.path.join(local_path, 'site.cfg') - if os.path.isfile(site_cfg): - shutil.copy(site_cfg, src_path) - - # Ugly hack to make pip work with Python 3, see #1857. - # Explanation: pip messes with __file__ which interacts badly with the - # change in directory due to the 2to3 conversion. Therefore we restore - # __file__ to what it would have been otherwise. - global __file__ - __file__ = os.path.join(os.curdir, os.path.basename(__file__)) - if '--egg-base' in sys.argv: - # Change pip-egg-info entry to absolute path, so pip can find it - # after changing directory. - idx = sys.argv.index('--egg-base') - if sys.argv[idx + 1] == 'pip-egg-info': - sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info') - + src_path = os.path.dirname(os.path.abspath(sys.argv[0])) old_path = os.getcwd() os.chdir(src_path) sys.path.insert(0, src_path) |