supports github releases
Project description
Github Actions define a GITHUB_DUMP environmental variable during build: this package parses it and it uses to create a “version” value from it depending on the branch name:
For a package foobar on a beta/0.0.1 branch where __init__.py file contains __version__ = "0.0.1" setuptools_github.tools.update_version(initfile, os.getenv("GITHUB_DUMP")) returns -> 0.0.1.b<N> (N is the ever increasing build number)
Version can be used in the setup.py script to generate packages as foobar-0.0.0.b<N> that are semantically ordered.
Introduction
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.1b42.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d02664e81e08ca6c8a0d55af6d7036382c16c294af61bfeb28eb5f4eb9d5cff |
|
MD5 | 5db7d6d5d7ac66115dc1f8c23f859e1b |
|
BLAKE2b-256 | 6bc58576932166019e079629b4dae033441f61566b065a7e4e7d1f45bf505e17 |
Hashes for setuptools_github-0.2.1b42-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e3b702cfa08ef4fd3dd3c8c86b17ad79fe00d24082c610791df533f9121e31e |
|
MD5 | 219052687389bea4b42d24a96221d5ea |
|
BLAKE2b-256 | 6921490da5739426b4e5141fc5b727e6595b095e1d9cb8114236a0b15aa200e9 |