Suppose a Python application depends on a module and the module declares only "Programming Language :: Python :: 3.5" in classifiers metadata in its setup.py, can the application declares a different version of Python interpreter (e.g., "Programming Language :: Python :: 3.7" in its own setup.py?
I realize the question while packaging my own Python3 application, for which I want to support all recent Python3 releases. The application depends on wcwidth module (https://pypi.org/project/wcwidth/). Wcwidth module lists only "Python :: 3.4" and "Python :: 3.5" in its programming language support. So I wonder what if I run "pip install " when using Python3.7 interpreter? I though it would fail but it turned out that the installation worked fine because pip downloaded wcwidth source and compiled it on my machine.
So it seems that pip doesn't really check classifiers at all when installing a package?
Setuptools is a package development process library designed to facilitate packaging Python projects by enhancing the Python standard library distutils (distribution utilities). It includes: Python package and module definitions. Distribution package metadata.
Each project's maintainers provide PyPI with a list of "Trove classifiers" to categorize each release, describing who it's for, what systems it can run on, and how mature it is. These standardized classifiers can then be used by community members to find projects based on their desired criteria.
setup. cfg is a cheekily named Python package which supports providing all of a Python distribution's metadata and build configuration via the setup. cfg file at the base of the distribution's source tree, rather than in the setup.py script. The standard setup.py script is reduced to a stub which uses the setup.
Trove classifiers are metadata written by the author for users, not for tools like pip
. You can get some useful information from it, especially with additional research.
For example, if a project declares compatibility with Python 2.4 you can be sure it will never support Python 3.
If a project declares compatibility with Python 3.4 and 3.5 but not 3.7 you can expect that the code will be compatible with 3.7 but still there are chances it will be not.
Also you should investigate. If the project hasn't been updated for a long period you should start to worry the project is no longer maintained and you better start to search for a more modern replacement.
In your question the project seems to be alive — the latest commit was in November. That means the absence of Python 3.5 and 3.6 in setup.py
is probably just an overlook. I recommend to send a pull request fixing this.
If the PR will not be accepted in, say, half a year then the project is abandoned. You can still continue using an abandoned project if it works for you. Or you can find a replacement. Or if you really need the project you can fork it, update and continue maintaining it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With