Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New sysconfig API: Install paths #103481

Open
FFY00 opened this issue Apr 12, 2023 · 2 comments
Open

New sysconfig API: Install paths #103481

FFY00 opened this issue Apr 12, 2023 · 2 comments
Labels
topic-sysconfig type-feature A feature request or enhancement

Comments

@FFY00
Copy link
Member

FFY00 commented Apr 12, 2023

Feature or enhancement

We should replace sysconfig.get_paths() with something that can accurately describe the current reality.

Pitch

The new API should:

  • Support optional paths (eg. not all schemes can provide a scripts directory)
  • Introduce the concept of writable and read-only paths (this should be the default for stdlib for eg.)
  • Introduce the concept of active location schemes (eg. posix_user should not be available on virtual environments)

API design

Previous discussion

https://discuss.python.org/t/building-extensions-modules-in-a-post-distutils-world/23938
https://discuss.python.org/t/pep-582-python-local-packages-directory/963/391
https://discuss.python.org/t/linux-distro-patches-to-sysconfig-are-changing-pip-install-prefix-outside-virtual-environments/18240/28
https://discuss.python.org/t/deprecating-the-headers-wheel-data-key/23712

New sysconfig API meta-issue: GH-103480

@FFY00 FFY00 added the type-feature A feature request or enhancement label Apr 12, 2023
@pradyunsg
Copy link
Member

Support optional paths (eg. not all schemes can provide a scripts directory)

Are there specific examples? What is the usecase for "optional" scheme paths?

@FFY00
Copy link
Member Author

FFY00 commented May 2, 2023

PEP 582 would be a good example in a normal environment. See https://discuss.python.org/t/pep-582-python-local-packages-directory/963/391 for some of the discussion regarding it.

WASM would be a good example of a new type of environment where certain paths, like scripts or include, don't make sense (at the moment at least) 1.

Footnotes

  1. PyScript, for eg., currently returns nonexistent paths in sysconfig.get_paths().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-sysconfig type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants