Skip to content

Commit

Permalink
Merge pull request #205 from pycompression/autoversion2
Browse files Browse the repository at this point in the history
Automated versioning using versioningit.
  • Loading branch information
rhpvorderman authored Jul 16, 2024
2 parents 7fc677c + cf11a81 commit 8c9319c
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ Release checklist
- [ ] Check outstanding issues on JIRA and Github.
- [ ] Check [latest documentation](https://python-isal.readthedocs.io/en/latest/) looks fine.
- [ ] Create a release branch.
- [ ] Set version to a stable number.
- [ ] Change current development version in `CHANGELOG.rst` to stable version.
- [ ] Change the version in `__init__.py`
- [ ] Check if the address sanitizer does not find any problems using `tox -e asan`
- [ ] Merge the release branch into `main`.
- [ ] Created an annotated tag with the stable version number. Include changes
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.8
Expand All @@ -33,7 +33,7 @@ jobs:
- twine_check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.8
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- os: "windows-latest"
python-version: "3.8"
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
python_version:
- "3.8"
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: uraimo/run-on-arch-action@v2.5.0
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
- os: "ubuntu-latest"
python_version: "pypy"
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install miniconda.
Expand Down Expand Up @@ -186,9 +186,10 @@ jobs:
cibw_archs_linux: "aarch64"
cibw_before_all_linux: "true" # The true command exits with 0
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # Fetch everything to get accurately versioned tag.
- uses: actions/setup-python@v2
name: Install Python
- name: Install cibuildwheel twine wheel
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
src/isal/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
graft src/isal/isa-l
include src/isal/*.h
prune tests
prune docs
prune benchmark_scripts
exclude requirements-docs.txt
exclude codecov.yml
exclude .readthedocs.yml
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[build-system]
requires = ["setuptools>=51", "wheel"]
requires = ["setuptools>=64", "versioningit>=1.1.0"]
build-backend = "setuptools.build_meta"

[tool.versioningit.vcs]
method="git"
default-tag = "v0.0.0"

[tool.versioningit.write]
file = "src/isal/_version.py"
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext

import versioningit

ISA_L_SOURCE = os.path.join("src", "isal", "isa-l")

SYSTEM_IS_BSD = (sys.platform.startswith("freebsd") or
Expand Down Expand Up @@ -136,7 +138,7 @@ def build_isa_l():

setup(
name="isal",
version="1.7.0-dev",
version=versioningit.get_version(),
description="Faster zlib and gzip compatible compression and "
"decompression by providing python bindings for the ISA-L "
"library.",
Expand Down
3 changes: 1 addition & 2 deletions src/isal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from ._isal import (ISAL_MAJOR_VERSION, ISAL_MINOR_VERSION, ISAL_PATCH_VERSION,
ISAL_VERSION)
from ._version import __version__

__all__ = [
"ISAL_MAJOR_VERSION",
Expand All @@ -15,5 +16,3 @@
"ISAL_VERSION",
"__version__"
]

__version__ = "1.7.0-dev"
8 changes: 8 additions & 0 deletions src/isal/_version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
# Python Software Foundation; All Rights Reserved

# This file is part of python-isal which is distributed under the
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.

__version__: int

0 comments on commit 8c9319c

Please sign in to comment.