Kalmat / PyWinCtl

Cross-Platform module to get info on and control windows on screen
Other
179 stars 19 forks source link

Fix XLib package name to its proper PyPi project #41

Closed MestreLion closed 1 year ago

MestreLion commented 1 year ago

The correct package is python-xlib, not xlib. See https://stackoverflow.com/q/74716030/624066

MestreLion commented 1 year ago

Speaking of requirements... you could integrate the packages in /docs/requirements.txt in setup.py as extra dependendecies in a tag dev or something.

Kalmat commented 1 year ago

Sure! I thought requirements.txt was mandatory (e.g. PyCharm demands it, to install with pip and so on...). Do you mean I can supress requirements.txt doing that? Do you have an example or similar about how to do it?

MestreLion commented 1 year ago

Sure! I thought requirements.txt was mandatory (e.g. PyCharm demands it, to install with pip and so on...). Do you mean I can supress requirements.txt doing that? Do you have an example or similar about how to do it?

Yup! requirements.txt is not used by any install mechanism, pip, setuptools, etc. It's just a convenience to install dependencies for local, non-redistributed modules that lack a setup.py, or if you want to reproduce an exact environment by pinning versions, usually with pip freeze > requirements.txt. Not the case for a published library such as this.

To declare those optional packages, just add this argument to setup.py.setup():

extras_require={'dev': ['mypy', 'types-setuptools', 'types-python-xlib',...]}

Full documentation: https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies

This amazing question on setup.py vs requirements.txt: https://stackoverflow.com/questions/43658870/requirements-txt-vs-setup-py