supports github releases
Project description
This package manages the __version__ and __hash__ variables in a __init__.py file in the github actions-driven builds.
For each build in a specially named branch (eg. /beta/N.M.O) a wheel package will created with a __version__ set to N.M.Ob<build-number> to respect the order in pep440 and a __hash__ set to the git hash.
A script setuptools-github-start-release will help to start a beta release branch.
Setup
The starting point is the master branch.
First add into the setup.py:
from setuptools_github import tools initfile = pathlib.Path(__file__).parent / "your_package/__init__.py" version = tools.update_version(initfile, os.getenv("GITHUB_DUMP")) setup( name="a-name", version=version, ...
Then insert into your_package/__init__.py:
__version__ = "0.0.0" __hash__ = ""
The setuptools_github supports a simple but reliable way to maintain beta and release branches of a project.
The main model is rather simple, all the code gets developed on the master branch.
A branch (named beta/N.M.O) maintains all the beta releases for a particular release: each one will have a version N.M.Ob<build-no>. Finally tagging the code as release/N.M.O, will formalize the “release” for N.M.O.
Features
Usage in setup.py:
from setuptools_github import tools initfile = pathlib.Path(__file__).parent / "your_package/__init__.py" version = tools.update_version(initfile, os.getenv("GITHUB_DUMP")) setup( name="a-name", version=version, ...
Requirements
Python >= 3.7.
setuptools
Installation
You can install setuptools-github via pip from PyPI:
$ pip install setuptools-github
Or conda:
$ conda install -c conda-forge setuptools-github
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for setuptools-github-0.2.1b43.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3915f3b8227d44fd1e0b7440f3acabb8f1d2280d4845a88dc9e014918917e68 |
|
MD5 | 158dbb23bf64501f7422c1f37e2b17c4 |
|
BLAKE2b-256 | 3ccc124d3b1e8b7faacc8904bd1fb1ee97570ed63341070e7519436bb10966de |
Hashes for setuptools_github-0.2.1b43-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf9f1fda41ffed7d0b00a31bfd1aa82cd848ba708fb7083576d3ac67c8d9a485 |
|
MD5 | a0c287cd3ea724b35292e325ed4a8b3e |
|
BLAKE2b-256 | ed20631e3c44ac8b7b02f441f9f915bdb024dedcd4485f21f1f6917090314129 |