BoboTiG / python-mss

An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
https://pypi.org/project/mss/
MIT License
987 stars 88 forks source link

Include documentation sources in sdist #240

Closed mgorny closed 1 year ago

mgorny commented 1 year ago

Changes proposed in this PR

Add documentation sources to the list of files included in sdist archives, in order to make it possible to build offline documentation using them. This is necessary in order to make it possible for Linux distributions such as Gentoo to be able to use sdists.

Is your code right?

mgorny commented 1 year ago

That said, I've noticed that the sdist on PyPI currently has venv directory — I don't know how it was added there, so I can't test a "fix" but I suspect you may want to exclude it explicitly.

BoboTiG commented 1 year ago

Thanks @mgorny !

Can you fix the venv stuff at the same time? 🙏🏻 I guess it was added in 426826b02634ca2decd35f931e2299397dcd2dcd, maybe do you know a better fix for such a warning? FTR, my setup is:

python -m venv venv
. venv/bin/activate
python -m pip install -r dev-requirements.txt
python -m build
BoboTiG commented 1 year ago

That said, I've noticed that the sdist on PyPI currently has venv directory — I don't know how it was added there, so I can't test a "fix" but I suspect you may want to exclude it explicitly.

If you can too, enhance the test-setup.py file to check the outout with wanted, and unwanted, files to prevent regressions. I will do it after your PR if you can't, no pression :)

mgorny commented 1 year ago

Can you fix the venv stuff at the same time? 🙏🏻 I guess it was added in 426826b, maybe do you know a better fix for such a warning?

I think that's the correct fix but tbh I'm not an expert on setuptools anymore.

FTR, my setup is:

python -m venv venv
. venv/bin/activate
python -m pip install -r dev-requirements.txt
python -m build

This doesn't seem to include venv for me either. I suspect the right entry would be either prune venv or recursive-exclude venv * but I don't want to add it blind if I can't reproduce.

If you can too, enhance the test-setup.py file to check the outout with wanted, and unwanted, files to prevent regressions. I will do it after your PR if you can't, no pression :)

I'm afraid that's too much work for me right now.

BoboTiG commented 1 year ago

I'll merge your PR, and fix the venv stuff right after. Thanks :)

mgorny commented 1 year ago

Thank you!

BoboTiG commented 1 year ago

I am having hard time with that stuff, so I created #243, if anyone can give a hand :)