Skip to content

Use automated versioning using versioningit #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-zlib-ng.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`
- [ ] Merge the release branch into `main`.
- [ ] Created an annotated tag with the stable version number. Include changes
from CHANGELOG.rst.
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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 @@ -36,7 +36,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 @@ -69,7 +69,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 @@ -97,7 +97,7 @@ jobs:
distro: [ "ubuntu_latest" ]
arch: ["aarch64"]
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: uraimo/run-on-arch-action@v2.2.0
Expand Down Expand Up @@ -132,7 +132,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 @@ -170,9 +170,10 @@ jobs:
- os: "ubuntu-latest"
cibw_archs_linux: "aarch64"
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 build
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
src/zlib_ng/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
9 changes: 9 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
graft src/zlib_ng/zlib-ng
prune tests
prune docs
prune benchmark_scripts
prune .github
exclude tox.ini
exclude requirements-docs.txt
exclude codecov.yml
exclude .readthedocs.yml
exclude .git*
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/zlib_ng/_version.py"
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext

import versioningit

ZLIB_NG_SOURCE = os.path.join("src", "zlib_ng", "zlib-ng")

SYSTEM_IS_UNIX = (sys.platform.startswith("linux") or
Expand Down Expand Up @@ -124,7 +126,7 @@ def build_zlib_ng():

setup(
name="zlib-ng",
version="0.5.0-dev",
version=versioningit.get_version(),
description="Drop-in replacement for zlib and gzip modules using zlib-ng",
author="Leiden University Medical Center",
author_email="r.h.p.vorderman@lumc.nl", # A placeholder for now
Expand Down
4 changes: 3 additions & 1 deletion src/zlib_ng/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
# This file is part of python-zlib-ng which is distributed under the
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.

__version__ = "0.5.0-dev"
from ._version import __version__

__all__ = ["__version__"]
8 changes: 8 additions & 0 deletions src/zlib_ng/_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-zlib-ng which is distributed under the
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.

__version__: int
Loading