New issue 2506: sysconfig returns incorrect paths
https://bitbucket.org/pypy/pypy/issues/2506/sysconfig-returns-incorrect-paths
Donald Stufft:
The sysconfig module is supposed to be able to be used to locate a variety of
Python path locations, however these APIs are returning the incorrect paths on
pypy.
Here's what this looks like on CPython 2.7:
```
$ python2 -c "import sysconfig,pprint; pprint.pprint(sysconfig.get_paths())"
{'data': '/Users/dstufft/.pyenv/versions/2.7.13',
'include': '/Users/dstufft/.pyenv/versions/2.7.13/include/python2.7',
'platinclude': '/Users/dstufft/.pyenv/versions/2.7.13/include/python2.7',
'platlib': '/Users/dstufft/.pyenv/versions/2.7.13/lib/python2.7/site-packages',
'platstdlib': '/Users/dstufft/.pyenv/versions/2.7.13/lib/python2.7',
'purelib': '/Users/dstufft/.pyenv/versions/2.7.13/lib/python2.7/site-packages',
'scripts': '/Users/dstufft/.pyenv/versions/2.7.13/bin',
'stdlib': '/Users/dstufft/.pyenv/versions/2.7.13/lib/python2.7'}
```
and here is PyPy 5.6.0:
```
pypy -c "import sysconfig,pprint; pprint.pprint(sysconfig.get_paths())"
{'data': '/Users/dstufft/.pyenv/versions/pypy-5.6.0',
'include': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/include',
'platinclude': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/include',
'platlib': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/lib-pypy/2.7',
'platstdlib': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/lib-pypy/2.7',
'purelib': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/lib-pypy/2.7',
'scripts': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/bin',
'stdlib': '/Users/dstufft/.pyenv/versions/pypy-5.6.0/lib-pypy/2.7'}
```
You can see that the platlib and purelib keys in PyPy are pointing to the PyPy
standard library location, whereas in CPython they are pointing to the
site-packages, which is the correct location.
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue