Add a minimal pyproject.toml for PEP517 #1168
Merged
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.
This PR allows pip isolated builds to work, but still uses the same build infrastructure as always, so shouldn't break anything.
I needed this because I develop a pipeline running on python 3.11, for which there isn't a wheel yet. The dependency manager I'm using (poetry) does all its builds in isolated environments, which is fine when
setup.py
doesn't depend on anything exceptsetuptools
and/orwheel
but has problems when you need e.g.cython
The solution is to add a minimal
pyproject.toml
file that includes the build dependencies, and specifies the correct build backend. That way, the isolated enviroment used for the build ends up with Cython, and everyone is happy.I added some stuff to the project description, but this is all already in
setup.cfg
I think, so could be removed. Ideally, everything would end up in thepyproject.toml
but I didn't want to break anything since I'm not 100% sure how this all interacts with e.g. CI and pushing to PyPI.