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 --sdist and then pip install dist/openfst_python-1.7.9.tar.gz.
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.
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 --sdist
and thenpip install dist/openfst_python-1.7.9.tar.gz
.python -m build --wheel
and 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.sh
because it looks quite complicated. I also recommend addingpython -m build --sdist
intocreate_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.