tarpas / pytest-testmon

Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.
https://testmon.org
MIT License
800 stars 54 forks source link

No source package upload to pypi #210

Closed matejsp closed 1 year ago

matejsp commented 1 year ago

What is your setup and what steps did you do? We try to always build wheels from source to be sure. However there is no source upload to pypi https://pypi.org/project/pytest-testmon/1.4.5/#files

What was the outcome? /

What did you expect instead? Source package available Run python3.8 setup.py sdist and upload tar.gz

What is your operating system and it's version please? MacOSX

tarpas commented 1 year ago

Thanks for reaching out Matej. Python packaging is a vast, fast moving topic. Can you point me to some recommendation (PYPA/blogs) that it's a good practice to upload both whl and tar.gz ?

My quick googling discovered only this and they seem to claim tar.gz is obsolete. https://blog.inedo.com/python/packages-authoring-best-practices

Can you point me to some explanation why you do what you do in your build pipeline?

matejsp commented 1 year ago

Most of other packages (Django, pytest, ...) that we encountered before did have a source distribution available.

Based on https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives (link from pypi in case of missing source distribution)

The tar.gz file is a source distribution whereas the .whl file is a built distribution. Newer pip versions preferentially install built distributions, but will fall back to source distributions if needed. You should always upload a source distribution and provide built distributions for the platforms your project is compatible with. In this case, our example package is compatible with Python on any platform so only one built distribution is needed.

Our use case is that we build whl ourselves since we don't trust the environment where they were build. Especially for binary wheels. In case when we need to fork we check that we can build ourselves (in case we need to fork).

tarpas commented 1 year ago

Thanks, we'll fix this.

pokopt commented 1 year ago

Hi @matejsp, you can find source release of pytest-testmon 1.4.5 on pypi now. We will release source packages from now on. Thanks for reaching us.