Skip to content
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: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["macos-latest", "ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
Expand Down
59 changes: 59 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
upstream_package_name: bitmath
downstream_package_name: python-bitmath
specfile_path: python-bitmath.spec
upstream_tag_template: "v{version}"

jobs:
# Copr build on every pull request
- job: copr_build
trigger: pull_request
version_suffix: ""
owner: tbielawa
project: bitmath-ci
targets:
- fedora-rawhide-x86_64
- fedora-42-x86_64
- epel-9-x86_64
- epel-10-x86_64

# Copr build on RC tags (v*-rc* pattern)
- job: copr_build
trigger: release
upstream_tag_include: "v.*-rc.*"
owner: tbielawa
project: bitmath-ci
targets:
- fedora-rawhide-x86_64
- fedora-42-x86_64
- epel-9-x86_64
- epel-10-x86_64

# propose_downstream on production tags (clean vX.Y.Z, no RC suffix)
- job: propose_downstream
trigger: release
upstream_tag_exclude: ".*-rc.*"
dist_git_branches:
- rawhide
- f42
- epel9
- epel10

# Koji build triggers after dist-git PR is merged
- job: koji_build
trigger: commit
dist_git_branches:
- rawhide
- f42
- epel9
- epel10

# Bodhi update after successful Koji build (stable branches only, not rawhide)
- job: bodhi_update
trigger: commit
dist_git_branches:
- f42
- epel9
- epel10
bodhi_extra_params:
update_type: enhancement
notes: "New upstream release. See https://github.com/timlnx/bitmath/releases for details."
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PKGNAME := python-$(NAME)

# VERSION file provides one place to update the software version.
VERSION := $(shell cat VERSION)
RPMRELEASE = $(shell awk '/global _short_release/{print $$NF; exit}' $(RPMSPEC).in)
RPMRELEASE := 1

RPMSPECDIR := .
RPMSPEC := $(RPMSPECDIR)/$(PKGNAME).spec
Expand Down Expand Up @@ -97,28 +97,24 @@ viewcover: ci-unittests
conf.py: docsite/source/conf.py.in
sed "s/%VERSION%/$(VERSION)/" $< > docsite/source/conf.py

# Build the spec file on the fly. Substitute version numbers from the
# canonical VERSION file.
python-bitmath.spec: python-bitmath.spec.in
sed "s/%VERSION%/$(VERSION)/" $< > $@

build: clean
@echo "#############################################"
@echo "# Building sdist + wheel"
@echo "#############################################"
python -m build
. $(NAME)env3/bin/activate && python -m build

pypi: build
@echo "#############################################"
@echo "# Uploading to PyPI"
@echo "#############################################"
twine upload dist/*
. $(NAME)env3/bin/activate && pip install twine && twine upload dist/*

pypitest: build
@echo "#############################################"
@echo "# Uploading to TestPyPI"
@echo "#############################################"
twine upload --repository testpypi dist/*
. $(NAME)env3/bin/activate && pip install twine && twine upload --repository testpypi dist/*

# usage example: make tag TAG=1.1.0-1
tag:
Expand All @@ -140,18 +136,18 @@ install:
mkdir -p /usr/share/man/man1/
gzip -9 -c bitmath.1 > /usr/share/man/man1/bitmath.1.gz

sdist: clean
sdist: clean virtualenv
@echo "#############################################"
@echo "# Creating SDIST"
@echo "#############################################"
python -m build --sdist
. $(NAME)env3/bin/activate && pip install build && python -m build --sdist

rpmcommon: sdist python-bitmath.spec
rpmcommon: sdist
@echo "#############################################"
@echo "# Building (S)RPM Now"
@echo "#############################################"
@mkdir -p rpm-build
@cp dist/$(NAME)-$(VERSION).$(RPMRELEASE).tar.gz rpm-build/$(VERSION).$(RPMRELEASE).tar.gz
@cp dist/$(NAME)-$(VERSION).tar.gz rpm-build/$(VERSION).tar.gz

srpm: rpmcommon
rpmbuild --define "_topdir %(pwd)/rpm-build" \
Expand All @@ -160,6 +156,8 @@ srpm: rpmcommon
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_pkgversion $(VERSION)" \
--define "_pkgrelease $(RPMRELEASE)" \
-bs $(RPMSPEC)
@echo "#############################################"
@echo "$(PKGNAME) SRPM is built:"
Expand All @@ -173,6 +171,8 @@ rpm: rpmcommon
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_pkgversion $(VERSION)" \
--define "_pkgrelease $(RPMRELEASE)" \
-ba $(RPMSPEC)
@echo "#############################################"
@echo "$(PKGNAME) RPMs are built:"
Expand Down
1 change: 0 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ As an emergency backup you can find me on bsky or instagram and direct message m
* [insta - @tim.lnx](https://www.instagram.com/tim.lnx/)

For less serious security issues with lower potential for exploitation or damage, please open a bug on the project and apply the `security` label to it.

22 changes: 22 additions & 0 deletions docsite/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ fix a failing check yourself, leave a comment on the pull request
explaining the situation and we'll help.


.. _contributing_python_versions:

Supported Python Versions
*************************

bitmath supports Python versions shipping with the current and previous
major RHEL release available via `EPEL <https://docs.fedoraproject.org/en-US/epel/>`_.
This means the minimum supported version tracks the oldest Python still
included in a supported EPEL target:

* **RHEL 10 / EPEL 10** — Python 3.12
* **RHEL 9 / EPEL 9** — Python 3.9, 3.11

The CI matrix tests all versions in this range. When a RHEL major
release reaches end-of-life and is dropped from EPEL, the corresponding
Python versions may be dropped from the support matrix in the next
bitmath release.

If anybody wants to take over Debian/Ubuntu patching, we can add notes
for which distributions are covered.


.. _contributing_automated_tests:

Automated Tests
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "bitmath"
version = "2.0.0"
description = "Pythonic module for representing and manipulating file sizes with different prefix notations (file size unit conversion)"
readme = "README.rst"
requires-python = ">=3.11"
requires-python = ">=3.9"
authors = [
{ name = "Tim Case", email = "bitmath@lnx.cx" },
]
Expand All @@ -23,6 +23,8 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down
Loading
Loading