Add tests to PyPI sdist
See original GitHub issueDistros need to run tests before promoting packages, and this is especially important here. Without tests in the PyPI sdist, we need to fetch the tarball from github, and then we need to rely on poetry to build the package. While poetry is a pretty decent tool for development, it is a lot more cumbersome and error prone than using raw setuptools.
As you are already releasing wheels on PyPI, adding tests to the sdist wont impact most users who will be fetching the wheels via pip, but it will make packagers lives a bit easier.
c.f. https://build.opensuse.org/request/show/844174
If that link stops working, you can see my initial packaging at https://build.opensuse.org/package/view_file/devel:languages:python:django/python-django-bootstrap3/python-django-bootstrap3.spec?expand=1&rev=364ea37ba17ad34941623d7a5701551f , where I use a few sed
commands to sanitise the pyproject.toml, and then use @dephell to convert the pyproject.toml to setup.py , so that the GitHub tarball build can be done using the same toolchain as if it was a PyPI released sdist. We have only recently got poetry working on openSUSE Tumbleweed (we had to bootstrap it using dephell until recently), and it hasnt been released as part of any openSUSE release.
You can see how few distros are actually keeping up with poetry releases at https://repology.org/project/python:poetry-core/versions , and a few more appear on https://repology.org/project/python:poetry/versions (poetry now depends on poetry-core, so discrepancies in those lists suggests those distros are not keeping up with poetry releases).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
poetry is great for use within development projects. Probably the best in my experience, at least from a usability & simplicity perspective. I’ll try to get it to emit the tests into the sdist.
Thanks @dyve . No need to push out a new release - @bnavigator has already got the current version packaged for openSUSE. We’ll take advantage of this for the next release.