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
67 changes: 67 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish releases to PyPI

on:
workflow_dispatch:
release:
types: [published]

jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-python@v7
with:
python-version: "3.11"

- name: Install build
run: python -m pip install build

- name: Build sdist
run: python -m build --sdist --outdir dist

- uses: actions/upload-artifact@v7
with:
name: dist-sdist
path: dist/*

build_wheels:
name: Build wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_WINDOWS: "AMD64"

- uses: actions/upload-artifact@v7
with:
name: dist-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

publish:
name: Publish to PyPI
needs: [build_sdist, build_wheels]
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
pattern: dist-*
path: dist
merge-multiple: true

- name: Publish distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
18 changes: 9 additions & 9 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.10"]
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "pypy-3.11"]

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -31,19 +31,19 @@ jobs:
run: |
flake8 .
- name: Build docs with sphinx
if: "matrix.python-version == '3.10'"
if: "matrix.python-version == '3.11'"
run: |
pip install -r docs/requirements.txt
sphinx-build -W -b html docs docs/_build/html
- name: Build packages
if: "matrix.python-version == '3.10'"
if: "matrix.python-version == '3.11'"
run: |
pip install -U twine wheel
python setup.py sdist bdist_wheel
pip install -U twine wheel build
python -m build
twine check dist/*
- name: Upload packages
if: "matrix.python-version == '3.10'"
uses: actions/upload-artifact@v4
if: "matrix.python-version == '3.11'"
uses: actions/upload-artifact@v7
with:
name: python-pure-cdb-packages
path: dist/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ venv.bak/
.mypy_cache/
.dmypy.json
dmypy.json

# MacOS
.DS_Store
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Sphinx
sphinx_rtd_theme
2 changes: 2 additions & 0 deletions docs/versions.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Version history
===============

* `Version 5.0.0 <https://github.com/dw/python-pure-cdb/releases/tag/v5.0.0>`_
* This package is now marked as supporting Python 3.10 and above
* `Version 4.0.0 <https://github.com/dw/python-pure-cdb/releases/tag/v4.0.0>`_
* This package is now marked as supporting Python 3.6 and above
* Fixed a bug related to items that hash to the value 0 (thanks to pwlodarczyk92)
Expand Down
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[build-system]
requires = ["setuptools>=77.0"]
build-backend = "setuptools.build_meta"

[project]
name = "pure-cdb"
version = "5.0.0"
description = "Pure Python reader/writer for Dan J. Bernstein's CDB format."
readme = "README.rst"
requires-python = ">=3.11"
license = "MIT"
authors = [
{ name = "Bo Bayles", email = "[email protected]" },
{ name = "David Wilson", email = "[email protected]" },
]
keywords = ["cdb", "file", "format", "appengine", "database", "db"]
dependencies = []

[project.urls]
Download = "https://github.com/bbayles/python-pure-cdb"

[project.scripts]
python-pure-cdbmake = "cdblib.cdbmake:main"
python-pure-cdbdump = "cdblib.cdbdump:main"

[project.optional-dependencies]
test = ["flake8"]

[tool.setuptools.packages.find]
include = ["cdblib"]

[[tool.setuptools.ext-modules]]
name = "cdblib._djb_hash"
sources = ["cdblib/_djb_hash.c"]

[tool.cibuildwheel]
build-frontend = "build"
skip = ["*-win32", "*-manylinux_i686", "*-musllinux_i686", "pp*"]
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[flake8]
filename =
./cdblib/*.py
./setup.py
44 changes: 0 additions & 44 deletions setup.py

This file was deleted.

Loading