How do I actually create a release/distro of a python package that uses a git repo tag for the versioning, using setuptools
and pbr
?
There is plenty of information on the basic setup and configuration required:
- SetupTools Documentation - setup() and setup.py configuration
- Python Packaging User Guide - Installing Packages
- PBR v3.1.1 documentation
- StackOverflow: How to use version info generated using
setuptools
andpbr
But where is the simple info on how to actually create the distro?
i.e. I'm looking for whatever command finds the git tag with the version info and pulls it into the configuration info, so the source with that new version info can be distributed, and the version info is discoverable from the scripts, using a method like described in this answer.
Additional details
I'm working on a project that will be distributed to other developers only through a git repo, not through PyPi. The project will be released to users as an executable using pyinstaller
, so this package distribution will only serve a few key purposes:
- Install/Setup the package for other developers so that dependencies/environment can be recreated cleanly.
- Manage versioning - Current plan is to use
pbr
to generate versions from the Git repo tags, so those tags can be our source of truth for versioning - Use
pbr
for other auto generation of mundane items from Git, such as authors, manifest.in file, release notes, etc.
Since setuptools
docs focus on setting up a fully distributable and reusable package with PyPi and pip
, and pbr
docs only really tell you how to modify setuptools
configuration to use pbr
, I can't find the info on how to just run the distribution/release process.
I'm sure it exists somewhere in the documentation, but after several false starts I'm asking here. It is implied everywhere I look that everyone either knows how to do this or it just magically happens as a part of the process.
Am I just missing the obvious?
Update:
Based on sinoroc's answer, it appears I need to look into development mode installs. i.e. Anyone developing the project will clone from git, and then install via using setuptools
development install mode.
This wasn't directly a part of the original question, but implied, and I believe will be of interest to people in the same situation (info I couldn't easily find).
More info is available in his answer on updating some of the metadata, and via this setuptools
documentation link to working in "Development Mode"