Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @maximlt and maintainers, this PR was created in response to pypa/setuptools#3841.
Please feel free to ignore/close or use parts of it in other PRs.
The main idea is to simplify
setup.py
to keep only configuration that needs to be dynamically computed (andpackage_dir
since it is directly related them).Everything else that is static can be moved to
pyproject.toml
.Notes:
package_dir
config to logic remap package directories to other locations (as long as they are inside the same project root).examples
folder.pip
/setuptools
deprecate direct usage ofpython setup.py ...
, these might even no longer be called.develop
andinstall
insys.argv
.param
andpyct
pre-installed in the correct versions (specified inpyproject.toml [build-system]
). Therefore version checks for those dependencies can be removed.pip
is relatively modern (released a couple of years ago), it should be possible for a package to depend on itself+extras.(If you have an intention of using this PR, please double check if I did not miss anything in
pyproject.toml
when doing the conversion...)(I also believe that it should be OK to remove
graft holoviews/examples
fromMANIFEST.in
, but I haven't checked that).Please note that when installing in editable mode some static analysis tools like vscode code intel and mypy may have trouble to find the package. This happens because static analysis tools may - understandably - have trouble to deal with dynamic parts of the Python language, such as
MetaPathFinder
andPathEntryFinder
.To workaround that you can use
pip install -e . --config-settings editable_mode=compat
for the installation. Note however that the packageholoviews.examples
will not be accessible for imports if the project is installed in that way.