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 was suggested in #186.
This converts pyfaidx to the "modern" way of setting metadata for Python projects (see PEP 621: Storing project metadata in pyproject.toml for details).
setuptools has introduced support for this in version 61, and it appears to be stable now.
Some tutorials that were helpful:
Also, the setuptools-scm configuration needed to be converted from how it’s done in
setup.py
, but this is documented well at https://github.com/pypa/setuptools_scm/.Since this removes
setup.py
, the README was updated to no longer recommendpython setup.py install
. Similarly,python setup.py sdist
no longer works. Instead, the build tool needs to be used. This can be done withpip install build && python -m build
(or "pipx run build" if pipx is available, as on the GitHub runners).Note that build produces both an sdist and a wheel file where previously only an sdist was generated. The pypa/gh-action-pypi-publish action will then publish both to PyPI.
My original motivation for submitting this PR is actually mainly this last bit: I noticed that when installing WhatsHap via
pip install
,pyfaidx
(which we have as a direct dependency) is the only package that does not provide a wheel, which makes the installation a tiny bit slower than it could be.Additional changes:
Closes #186