Implement PEP-518 configuration #7
Open
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.
PEP-518 becomes very essential nowadays.
It prevents multi-step pip install when building from source:
Besides, tools like Poetry won't even work if the build requirements are not defined using PEP-518.
Reference: Build System Support - setuptools.
What I have tested (using CPython 3.8.10):
pip install .without installing any Python packages beforehand.pip install git+https://github.com/ianlini/openfst-python.git@pep-518, which is actually very similar to 1.python -m build --sdistand thenpip install dist/openfst_python-1.7.9.tar.gz.python -m build --wheeland thenpip install dist/openfst_python-1.7.9-cp38-cp38-linux_x86_64.whl.All of them work as expected.
However, I didn't test
create_wheels.shbecause it looks quite complicated. I also recommend addingpython -m build --sdistintocreate_wheels.shso that you won't forget to publish the source distribution. For example, 1.7.3 on PyPI doesn't include the source distribution.