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.0b40.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c547b71020970cb4166d66fe968bfd0180ed44b673bf85cb7af618249cb59661 |
|
MD5 | ab83ca02e156468514992f12580ce8d7 |
|
BLAKE2b-256 | a988afb0efa52759bbb5ff2dd3df6a6fc4291d79749dc60d04a31b0f059611cb |
Hashes for setuptools_github-0.2.0b40-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae0cc9c9d1c3fc480d1aac95ee49ccdb9fe3a5179f4ac930fe8eb2190ea3ad5 |
|
MD5 | 67cba8306c93dccef2206ee2073ebf5b |
|
BLAKE2b-256 | 1613cbffc13a963a31ac98b77f41a9767b3f7ce9f4caf59e0638c59754b8a289 |