-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: abravalheri/setuptools
base: 1a1397a4
head repository: abravalheri/setuptools
compare: 4a986086
- 7 commits
- 4 files changed
- 1 contributor
Commits on Jan 24, 2022
-
Use run_setup to obtain a dist object in build_meta
The `run_setup` function from `distutils.core` allows retrieving the distribution object before the configuration is read. This is very useful from the build backend perspective, since will allow the direct manipulation of this object instead of just running the `setup.py` script.
Configuration menu - View commit details
-
Copy full SHA for f6f4c86 - Browse repository at this point
Copy the full SHA f6f4c86View commit details -
Use the distribution object to run commands in build_meta
Once we have access to the distribution object, it is no longer necessary to fully run the setup script. Instead the backend can have more control over the process. This change build on top of the `_get_dist` function and the `distutils.core.run_commands` to trigger commands on the distribution object. For the legacy backend the setup script still runs traditionally (but the corner cases are handled directly by `distutils.core.run_setup`)
Configuration menu - View commit details
-
Copy full SHA for cb4829e - Browse repository at this point
Copy the full SHA cb4829eView commit details -
Replace _get_build_requires by using the dist object
Now that the dist object is available for the backend, we can simplify the workarounds to obtain the `setup_requires` (just reading the equivalent attribute in the dist object should suffice)
Configuration menu - View commit details
-
Copy full SHA for 4223ca9 - Browse repository at this point
Copy the full SHA 4223ca9View commit details -
Add some entry-points to the bootstrap
These entry-points seem to be required for the using the dist object directly on the build_meta: - dist_info - developt - install_scripts - install_egg_info - bdist_egg
Configuration menu - View commit details
-
Copy full SHA for bd50f4d - Browse repository at this point
Copy the full SHA bd50f4dView commit details -
Make sure changes in build_meta are compatible with tests
After the changes in build_meta some changes with the checks and tests are required.
Configuration menu - View commit details
-
Copy full SHA for 3ddcf05 - Browse repository at this point
Copy the full SHA 3ddcf05View commit details -
Make
script_name
onbuild_meta
less error prone`distutils.sdist:sdist._add_defaults_standards` will try to add `script_name` to the list of files to include in the distribution. If the SETUP_SCRIPT does not exist, the best is to use some made-up name that is unlikely to exist as a file. If we use `sys.argv[0]` setuptools might try to add things like `.tox/python/bin/pytest` to the tar.gz (and this will result in an error)
Configuration menu - View commit details
-
Copy full SHA for 667ad4b - Browse repository at this point
Copy the full SHA 667ad4bView commit details -
Update build_meta to use dist objects instead of simply running setup.py
(Merge branch 'use-dist-object-in-built-meta' into support-pyproject) We can rely on `distutils.core.run_setup` to get access to the distribution object while also postponing the execution of the build commands. This allows directly manipulation of the distribution object (which is for example useful to add configurations from different files such as `pyproject.toml`) as well as introspecting it for metadata (such as `setup_requires`).
Configuration menu - View commit details
-
Copy full SHA for 4a98608 - Browse repository at this point
Copy the full SHA 4a98608View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1a1397a4...4a986086