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
Merge PEP 660 implementation into main
#3488
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.
-
Commits on Jun 16, 2022
-
-
Make the dist info args translation private
It requires changes in other parts of the build system/commands to be able to be used.
-
-
Support --build-option alongside --global-option
`--build-option` should be used as a escape hatch to pass command specific options, while `--global-option` can be used to pass flags like `--quiet` or `--verbose`.
-
-
-
-
-
-
Commits on Jun 17, 2022
Commits on Jun 18, 2022
Commits on Jun 19, 2022
Commits on Jun 20, 2022
Commits on Jun 21, 2022
-
-
Allow dist-info to keep original egg-info directory
During a PEP 517 build, this directory can later be passed to ``build_py`` via the ``existing_egg_info_dir attribute`` (which in turn avoids re-running ``egg_info`` to create a manifest).
-
build_meta: Allow dist-info and egg-info to coexist
PEP 517 does not care if other directories/files are left behind in the `metadata_directory`, as long as a `.dist_info` directory is produced at the root. We can leave the `.egg-info` directory behind, so this way we don't have to run it again when listing files from `build_py`.
-
Commits on Jun 24, 2022
Commits on Jun 25, 2022
-
-
-
-
-
Test symlinks in the target directory
Improve chances that symlinks are tested directly on the relevant file system (some machines might have multiple disks with different link support).
-
-
-
-
-
Commits on Jun 27, 2022
Commits on Jun 29, 2022
Commits on Jul 3, 2022
Commits on Jul 4, 2022
Commits on Jul 21, 2022
Commits on Aug 2, 2022
-
-
-
Use venv to isolate test_legacy_editable_install
This is a test fix to prevent this test case for breaking test isolation.
-
-
Commits on Aug 3, 2022
-
-
-
-
-
-
-
Add compat mode to editable install
This is only a transitional measure that can be temporarily used by users to help them to adapt to the PEP 660 implementation. In this commit the argument for the `editable_wheel` command is changed from the flag form `--strict` to `--mode=strict`.
-
Make editable mode nomenclature homogeneous
The terms being used are: lenient, strict and compat.
-
-
-
-
-
Commits on Aug 4, 2022
-
-
-
Add transitional compat editable install (#3484)
Add a temporary compat mode that will try (best effort) to emulate the same "static .pth" file produced by python setup.py develop. This was originally suggested in https://discuss.python.org/t/help-testing-pep-660-support-in-setuptools/16904
-
Update docs on the development_mode page (#3485)
Mention: - compat mode - limitations in terms of accessing files outside of the package directory. - limitations in terms of __file__ and __path__ exact values. implementation mechanisms
-