diff options
author | David Naylor <dbn@FreeBSD.org> | 2013-07-30 20:22:47 +0000 |
---|---|---|
committer | David Naylor <dbn@FreeBSD.org> | 2013-07-30 20:22:47 +0000 |
commit | 38a645dfe93761a0b2d3e1965a7ce05c6feb83b1 (patch) | |
tree | 5093a7d2f124d907b7c9a2af88e9b7c1b8436c95 /lang/pypy | |
parent | Update c-icap-modules to 0.2.4 (diff) |
Fix lang/pypy library detection.
The library detection orginally depended on sys.version however that
tends to change a lot and thus a more robust method is used based on
sys.pypy_version_info.
This fixes installation using distutils and corrects output from sysconfig.
Special thanks to Attila Nagy who reported the issue and tracked down
the root issue (allowing me to deliver a quick solution).
Reported by: Attila Nagy <bra@fsn.hu>
Notes
Notes:
svn path=/head/; revision=323991
Diffstat (limited to 'lang/pypy')
3 files changed, 5 insertions, 5 deletions
diff --git a/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py b/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py index fbc6876d009d..745f98d63614 100644 --- a/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py +++ b/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py @@ -17,7 +17,7 @@ # about needing recursive variable expansion (shudder). py_version = (string.split(sys.version))[0] -+ pypy_version = sys.version[-6:-3] ++ pypy_version = '%s.%s.%s' % sys.pypy_version_info[:3] (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), diff --git a/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py b/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py index 3619db91ecf6..a889118f1d95 100644 --- a/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py +++ b/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py @@ -5,7 +5,7 @@ def get_python_inc(plat_specific=0, prefix=None): from os.path import join as j - return j(sys.prefix, 'include') -+ return j(sys.prefix, 'include', 'pypy' + sys.version.rsplit(' ', 1)[-1][:3]) ++ return j(sys.prefix, 'include', 'pypy%s.%s' % sys.pypy_version_info[:2]) def get_python_version(): """Return a string containing the major and minor Python version, @@ -15,8 +15,8 @@ if standard_lib: - return os.path.join(prefix, "lib-python", get_python_version()) - return os.path.join(prefix, 'site-packages') -+ return os.path.join(prefix, 'lib', 'pypy' + sys.version[-6:-3]) -+ return os.path.join(prefix, 'lib', 'pypy' + sys.version.rsplit(' ', 1)[-1][:3], 'site-packages') ++ return os.path.join(prefix, 'lib', 'pypy%s.%s' % sys.pypy_version_info[:2]) ++ return os.path.join(prefix, 'lib', 'pypy%s.%s' % sys.pypy_version_info[:2], 'site-packages') _config_vars = None diff --git a/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py b/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py index 3d03391fb63f..7608ca460458 100644 --- a/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py +++ b/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py @@ -23,7 +23,7 @@ 'scripts', 'data') _PY_VERSION = sys.version.split()[0] _PY_VERSION_SHORT = sys.version[:3] -+_PYPY_VERSION = sys.version.rsplit(' ', 1)[-1][:-1] ++_PYPY_VERSION = '%s.%s.%s' % sys.pypy_version_info[:3] +_PYPY_VERSION_SHORT = _PYPY_VERSION[:3] _PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2] _PREFIX = os.path.normpath(sys.prefix) |