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 support 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.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d81e7f85a95cc592c5b90c58623f2409541b774ffe5556f95aae057d46befbf |
|
MD5 | 7f0c0332b74dba9c91d08f8a3038df09 |
|
BLAKE2b-256 | fa63b0f43e2a748e46a58604694073f3509578f2c115e3070f631efb37d7bc0d |