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"))
Requirements
Python >= 3.6.
setuptools
Installation
You can install setuptools-github via pip from PyPI:
$ pip install setuptools-github
Or conda:
$ conda -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.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ae036d126a67aca6ad3007b01e7f448034cd28103dd30a5efbe344534ad848b |
|
MD5 | ce69c42d8019151f82429224032ddc89 |
|
BLAKE2b-256 | 68ee26e5607277d1b60e0743996ac63b5409a863c30f40b80c3d1e3d4c304c25 |