About
Code - Version and Code Versioning - Release in Python
This naming convention of compiled files allows compiled modules from different releases of Python to coexist.
Articles Related
Properties
All below properties of a build. ie:
All properties may be specified in the alias command. The alias command has default value that can be specified:
- sitewide
- or per-user
Projects may overwrite them.
Example with an alias called daily a daily job would run in each project directory
setup.py daily
Scheme
Any scheme can be chosen if it follows this comparison. See doc
>>> 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.
Tag
setuptools allows you to “tag”:
- the source
with:
- 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
You can add these tags by adding egg_info and the desired options to the command line ahead of the sdist or bdist commands that you want to generate a daily build or snapshot for.
See
Default tags may be specified in setup.cfg:
Rotate
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
Official
https://setuptools.readthedocs.io/en/latest/setuptools.html#making-official-non-snapshot-releases
Management
Update
https://pyup.io/ - Keep Python dependencies secure, up-to-date & compliant