site-packages path to pythonx.y or rustpythonx.y?
questions
- Which one is better?
- How's other distributions do?
- If they do special handling, why doesn't it exist under
Lib/sysconfig.py?
- If they do special handling, why doesn't it exist under
- Which one fits better to minimize stdlib diff from CPython?
recent changes: #4924
#2. pypy adds site-packages to Lib/pypy3.8
I checked code in pypy3.8-v7.3.11-linux64
Their sysconfig looks like this (for schemes)
'posix_prefix': {
'stdlib': '{installed_base}/lib/{implementation_lower}{py_version_short}',
'platstdlib': '{platbase}/lib/{implementation_lower}{py_version_short}',
'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages',
'platlib': '{platbase}/lib/{implementation_lower}{py_version_short}/site-packages',
'include':
'{installed_base}/include/{implementation_lower}{py_version_short}{abiflags}',
'platinclude':
'{installed_platbase}/include/{implementation_lower}{py_version_short}{abiflags}',
'scripts': '{base}/bin',
'data': '{base}',
}
where implementation is defined as
def _get_implementation():
if sys.implementation.name == 'pypy':
return 'PyPy'
return 'Python'
For #1 I prefer having rustpython as it minimizes any confusion (where my site-packages are) but it does add diffs in #3.
Couldn't check Jython for venv site packages as it doesn't support python3 (yet!) and IronPython needs .NET framework (need to figure out how to emulate this on linux)
Thank you! Practically graalpython will be the last part, but I think checking pypy was enough.
Maybe filing a patch from pypy to CPython and taking it from RustPython will be a way - if CPython accepts it.
I am a bit confused. The file looks under 2.7 path, but it is still used in python3, right? Last edit was 4 months ago.
https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/lib-python/2.7/sysconfig.py
Thank you! Practically graalpython will be the last part, but I think checking pypy was enough.
Maybe filing a patch from pypy to CPython and taking it from RustPython will be a way - if CPython accepts it.
Opened an issue in cpython
I am a bit confused. The file looks under
2.7path, but it is still used in python3, right? Last edit was 4 months ago.https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/lib-python/2.7/sysconfig.py
I think this is for pypy 2.7, I don't see venv module anywhere in above source tree. Source tarball which I have does have venv module
CPython issue: https://github.com/python/cpython/issues/103708
The fix is merged! @itsankitkp Thank you!