releasecmd
Summary
releasecmd is a release subcommand for setup.py (setuptools.setup).
The subcommand create a git tag and push, and upload packages to PyPI.
The subcommand class (releasecmd.ReleaseCommand) is implemented as
a subclass of setuptools.Command class.
The release subcommand does the followings:
- Find a file that defined the package version (e.g.
<package>/__init__.py) - Create
.ascfiles if--signoption is specified - Create a git tag from the package version information
- GPG signing to the git tag if
--signoption is specified
- GPG signing to the git tag if
- Push git tags
- Upload package files to PyPI by using
twine
release command options
Options for 'ReleaseCommand' command:
--skip-tagging skip a git tag creation
--dry-run do no harm
--sign make a GPG-signed tag
--tag-template specify git tag format. defaults to 'v{version}'.
--version specify version manually
Example
$ python setup.py release running release [get the version from ./releasecmd/__version__.py] [create a git tag: v0.0.15] [push git tags] [upload the package to PyPI] ...
prerequisite: package binaries must bein in the dist/ directory.
Specify version manually
You can specify a vesion manually by --version option even if ./<package name>/__version__.py file does not exists.
$ python setup.py release --version 0.1.0 [create a git tag: v0.1.0] [push git tags] [upload packages to PyPI]
Create a GPG signed tag and upload packages
$ python setup.py release --sign running release [get the version from ./releasecmd/__version__.py] [create a .asc file for releasecmd-0.1.0.tar.gz] [create a .asc file for releasecmd-0.1.0-py2.py3-none-any.whl] [create a git tag with gpg signing: v0.1.0] [push git tags] [upload packages to PyPI] ...
Skip create a git tag and upload packages
$ python setup.py release --skip-tagging running release [get the version from ./releasecmd/__version__.py] [push git tags] [upload packages to PyPI] ...
Dependencies
- Python 3.5+
git

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
