Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make site-packages implementation configurable #103708

Closed
@itsankitkp

Description

@itsankitkp

Enhancement

It is confusing for different implementations of python (eg pypy and rustpython) to specify correct layout of site-packages, whether they should include their own implementation (by making huge diffs in sysconfig.py) or use same as cpython's implementation viz pythonX.Y. Pypy has good solution of this problem where sysconfig _INSTALL_SCHEMES has termimplementation_lower (lower counterpart ofimplementation). Definition ofimplementation is up to different flavours of python to decide. This can reduce lot of diffs in sysconfig.py in various implementations and make layout of site-packages more uniform.

Example (taken from Pypi implementation)

'posix_prefix': {'stdlib':'{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':'{base}/include/{implementation_lower}{py_version_short}','platinclude':'{platbase}/include/{implementation_lower}{py_version_short}','scripts':'{base}/bin','data':'{base}',        }
def_get_implementation():ifsys.implementation.name=='pypy':return'PyPy'return'Python'

Related discussions

RustPython/RustPython#4925

Reference:https://github.com/mozillazg/pypy/blob/master/lib-python/2.7/sysconfig.py

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp