Skip to content

Commit

Permalink
adding additional conditional for distutils installed on 64bit archit…
Browse files Browse the repository at this point in the history
…ectures.
  • Loading branch information
toumorokoshi committed Aug 20, 2016
1 parent 6a6e831 commit 5b29a67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
]

setup(name='uranium',
version='0.2.45b',
version='0.2.49b',
description='a build system for python',
long_description=open('README.rst').read(),
author='Yusuke Tsutsumi',
Expand Down
17 changes: 11 additions & 6 deletions uranium/lib/sandbox/venv/activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ def _clean_package_resources(_pkg_resources, old_prefix):


def _load_distutils(root):
distutils_path = os.path.join(root, 'lib', 'python%s' % sys.version[:3], 'distutils', '__init__.py')
with open(distutils_path) as f:
exec(f.read(), {
"__file__": distutils_path,
"__path__": []
})
distutils_path_candidates = [
os.path.join(root, 'lib', 'python%s' % sys.version[:3], 'distutils', '__init__.py'),
os.path.join(root, 'lib64', 'python%s' % sys.version[:3], 'distutils', '__init__.py')
]
for p in distutils_path_candidates:
if os.path.exists(p):
with open(p) as f:
exec(f.read(), {
"__file__": p,
"__path__": []
})

0 comments on commit 5b29a67

Please sign in to comment.