This naming convention of compiled files allows compiled modules from different releases of Python to coexist.
>>> from pkg_resources import parse_version >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev') True >>> parse_version('2.1-rc2') < parse_version('2.1') True >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9') True
This comparison is used by setuptools to tell which version is newer than the other.
setuptools allows you to “tag”:
- the source
- pre-release tag such as “build” or “dev”
- post-release tag, such as:
- a build or revision number (–tag-build=STRING, -bSTRING)
- build date (–tag-date, -d) - 8-character
Default tags may be specified in setup.cfg:
the rotate command lets you automatically delete all but the N most-recently-modified distributions matching a glob pattern.
Example: To build an egg whose version info includes ‘DEV-rNNNN’ (where NNNN is the most recent Subversion revision that affected the source tree), and then delete any egg files from the distribution directory except for the three that were built most recently.
setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3
https://pyup.io/ - Keep Python dependencies secure, up-to-date & compliant