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
Implement PEP 660 allowing both "strict" and "lax/loose" approaches #3265
Implement PEP 660 allowing both "strict" and "lax/loose" approaches #3265
Commits on Feb 4, 2022
Commits on Apr 22, 2022
Commits on Jun 15, 2022
-
-
-
-
-
-
-
-
-
Editable rework dist_info to use --output-dir instead of --egg-base
Changes: - Deprecate the --egg-base parameter for dist_info and add --output-dir as replacement (Since the egg format is mostly deprecated, it is nice to move away from this nomenclature...)
-
-
-
-
-
-
Rework PEP 660 PoC to re-use bdist_wheel
Avoid using the editables dependency - The current implementation is using it to simply place .pth file pointing to the project directory anyway... - Adding a dependency for creating a file with a single line is a bit overkill. Avoid importing pkg_resources directly - Setuptools wants to move away from pkg_resources Replace custom wheel build with re-use of bdist_wheel - pro: avoid re-implementing the archiving logic and make sure it is compatible with the same archive format used by the final wheels. - con: the API of wheel is not exactly stable or exported as public.
-
-
-
-
Handle namespace_packages in editable_wheel
This change is heavily inspired by the existing develop command - Use namespaces.Installer to ensure legacy namespaces are handled.
-
-
-
Add initial implementation of editable strategy based on .pth file
- Improve the skeleton that would allow the separation between different editable strategies - Extract strategy for static .pth files - Recognise the static .pth file as the primary strategy for src-layout packages in a "non"-strict scenario
-
-
-
Add tests for editable install focusing on namespaces
- Move test_editable_prefix from test_develop to test_editable_install - Add more tests for editable install focusing on packages using namespaces (legacy or PEP 420)
-
-
-
-
-
-
-
-
-
Initial editable MetaPathFinder for top-level pkgs
- Add improvements and small fixes for the static .pth file strategy - Add initial implementation of an editable strategy based on MetaPathFinder but just for the top-level packages/modules - The idea here is to create a "loose/lax" mechanism that is able to handle the complex mapping mechanisms supported by setuptools (via package_dir) while still allowing new modules and files to be added to existing packages.
-
-
Add temporary workaround for packages.find.exclude
This workaround can be reverted when issue 3261 is fixed.
-
-
-
-
-
-
-
-
Add editable strategy based on a link tree
- Add implementation of editable strategy based on a link tree - This is the `strict` implementation. - Only files are linked, not directories. - This approach makes it possible to use harlinks when softlinks are not available (e.g. Windows) - It also guarantees files that would not be part of the final wheel are not available in the editable install. - Add non-editable files to the produced wheel wheel (e.g. `headers`, `scripts`, `data`)
-
-
-
-
Ensure namespaces from ImportFinder handle additions to path
According to the PEP 420, namespace packages need to gracefully handle later additions to path. - Use a `PathEntryFinder` + an arbitrary placeholder entry on `sys.path` to force `PathFinder` to create a namespace spec. - Since `_NamespacePath` and `_NamespaceLoader` are private classes (or just documented for comparison purposes), there is no other way to implement this behaviour directly [^1]. [^1]: Reimplementing _NamespacePath + a custom logic to maintain namespace portions don't have a corresponding path entry also seems to have the same end result.