Skip to content
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

Implement PEP-518 configuration #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ianlini
Copy link

@ianlini ianlini commented Jan 29, 2023

PEP-518 becomes very essential nowadays.
It prevents multi-step pip install when building from source:

# before
pip install setuptools requests cython
pip install openfst-python

# after
pip install openfst-python

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):

  1. pip install . without installing any Python packages beforehand.
  2. pip install git+https://github.com/ianlini/openfst-python.git@pep-518, which is actually very similar to 1.
  3. python -m build --sdist and then pip install dist/openfst_python-1.7.9.tar.gz.
  4. python -m build --wheel and then pip 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.sh because it looks quite complicated. I also recommend adding python -m build --sdist into create_wheels.sh so that you won't forget to publish the source distribution. For example, 1.7.3 on PyPI doesn't include the source distribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant