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.3b39.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ca0838e7f391133ddf40c047cab80eb3e97fa00fb123af952d2a09bbf72f462 |
|
MD5 | f10ac737b8c83ff6e29755c60c950cbb |
|
BLAKE2b-256 | ec53286bc419ec4feed540aea479dc98fde6be4f1d83a2ab18f900bdc5f33815 |
Hashes for setuptools_github-0.1.3b39-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1429bef15708c8968e28df662a04a2dde4b6c17423571dbe861a12045db5b03 |
|
MD5 | a1c51be0f4a875c54c306c25d510c2fd |
|
BLAKE2b-256 | 035cddcf02320f660cc88e3d10b76bb3dca687fb1eaf819da0fcb908c9b5bc99 |