Closed MestreLion closed 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.
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?
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
The correct package is
python-xlib
, notxlib
. See https://stackoverflow.com/q/74716030/624066