Skip to content

Commit c88e85e

Browse files
escherbaflorianvazelleMartyMacGyver
authored
v0.4.0 (#33)
* ci: bump actions/upload-artifact to v4 * ci: bump ubuntu os to 24.04 * add cp312 support (v0.3.4) * ci: bump cibuildwheel to 2.23.3 * Modernize to build with newer Python 3 versions; improve tests (#32) Using the int cast in the 128-bit logic causes Cython to emit __Pyx_PyLong_From_uint64_t((__pyx_v_result.first << 64ULL)) instead of the broken PyNumber_Lshift(__pyx_t_9, __pyx_mstate_global->__pyx_int_64L) when we shift left a "long" int with 64ULL Added a test that actually checks the value returned for the 128-bit hashes. Co-authored-by: Eugene Scherba <escherba@gmail.com> * add cp313 and update workflows --------- Co-authored-by: florianvazelle <ponythugflorian@gmail.com> Co-authored-by: Martin Falatic <martin@falatic.com>
1 parent 033fe1e commit c88e85e

7 files changed

Lines changed: 5688 additions & 2148 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [windows-latest, macos-latest, ubuntu-latest]
18-
python-version: ["3.11"]
18+
python-version: ["3.13"]
1919

2020
runs-on: ${{ matrix.os }}
2121
steps:
22-
- uses: actions/checkout@v2
22+
- name: Checkout
23+
uses: actions/checkout@v4
2324

2425
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2627
with:
2728
python-version: ${{ matrix.python-version }}
2829
architecture: x64
2930

3031
# block below based on:
3132
# https://medium.com/ai2-blog/python-caching-in-github-actions-e9452698e98d
32-
- uses: actions/cache@v3
33+
- name: Cache Python environment
34+
uses: actions/cache@v4
3335
with:
3436
path: ${{ env.pythonLocation }}
3537
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pip-freeze.txt') }}

.github/workflows/publish.yml

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,74 +14,80 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
os: [ubuntu-20.04, windows-2019, macOS-10.15]
17+
os: [ubuntu-24.04, windows-2022, macOS-13]
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
21+
2122
- name: Set up Python
22-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2324
with:
2425
python-version: '3.9'
26+
2527
- name: Set up QEMU
2628
if: runner.os == 'Linux'
2729
# uses: docker/setup-qemu-action@v1.0.1
28-
uses: docker/setup-qemu-action@v2
30+
uses: docker/setup-qemu-action@v3
2931
with:
3032
platforms: arm64
33+
3134
- name: Build wheels
3235
# uses: joerick/cibuildwheel@v1.9.0
33-
uses: pypa/cibuildwheel@v2.11.2
36+
uses: pypa/cibuildwheel@v2.23.3
3437
with:
3538
output-dir: wheelhouse
3639
env:
37-
CIBW_BUILD: '{cp36,cp37,cp38,cp39,cp310,cp311}-{manylinux_x86_64,manylinux_aarch64,win32,win_amd64,macosx_x86_64} {cp39,cp310,cp311}-macosx_arm64'
40+
CIBW_BUILD: '{cp36,cp37,cp38,cp39,cp310,cp311,cp312,cp313}-{manylinux_x86_64,manylinux_aarch64,win32,win_amd64,macosx_x86_64} {cp39,cp310,cp311,cp312,cp313}-macosx_arm64'
3841
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
3942
CIBW_ARCHS_LINUX: 'auto aarch64'
4043
CIBW_ARCHS_MACOS: 'auto arm64'
4144
CIBW_TEST_REQUIRES: pytest
4245
CIBW_TEST_COMMAND: 'pytest -s {project}/tests'
4346
CIBW_TEST_SKIP: '*-macosx_arm64' # Until the day Apple silicon instances are available on GitHub Actions
44-
- uses: actions/upload-artifact@v3
47+
48+
- name: Upload artifact
49+
uses: actions/upload-artifact@v4
4550
with:
51+
name: cibw-wheels-${{ strategy.job-index }}
4652
path: ./wheelhouse/*.whl
53+
4754
build_sdist:
4855
name: Build a source distribution
49-
runs-on: ubuntu-20.04
56+
runs-on: ubuntu-24.04
5057
steps:
5158
- name: Checkout
52-
uses: actions/checkout@v2
59+
uses: actions/checkout@v4
60+
5361
- name: Set up Python
54-
uses: actions/setup-python@v4
62+
uses: actions/setup-python@v5
5563
with:
5664
python-version: '3.9'
65+
5766
- name: Build sdist
5867
run: |
5968
pip install py-cpuinfo
6069
python setup.py build sdist
61-
- uses: actions/upload-artifact@v3
70+
71+
- name: Upload artifact
72+
uses: actions/upload-artifact@v4
6273
with:
74+
name: cibw-sdist-${{ strategy.job-index }}
6375
path: dist/*.tar.gz
76+
6477
publish:
6578
name: 'Upload to PyPI/TestPyPI'
66-
runs-on: ubuntu-20.04
79+
runs-on: ubuntu-24.04
6780
needs: [build_wheels, build_sdist]
81+
environment: ${{ github.event.inputs.repository }}
82+
permissions:
83+
id-token: write
6884
steps:
69-
- name: Set up Python
70-
uses: actions/setup-python@v4
71-
with:
72-
python-version: '3.9'
73-
- name: Set up built items
74-
uses: actions/download-artifact@v3
75-
with:
76-
name: artifact
77-
path: dist
78-
- name: Install dependencies
79-
run: |
80-
python -m pip install --upgrade pip
81-
pip install setuptools wheel twine
82-
- name: Publish
83-
env:
84-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
85-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
86-
run: |
87-
twine upload --verbose --repository ${{ github.event.inputs.repository }} dist/*
85+
- uses: actions/download-artifact@v4
86+
with:
87+
pattern: cibw-*
88+
path: dist
89+
merge-multiple: true
90+
91+
- uses: pypa/gh-action-pypi-publish@release/v1
92+
with:
93+
password: ${{ secrets.PYPI_API_TOKEN }}

pip-freeze.txt

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
appnope==0.1.3
2-
asttokens==2.2.1
3-
attrs==22.1.0
1+
attrs==21.4.0
42
backcall==0.2.0
5-
Cython==0.29.32
3+
Cython==0.29.28
64
decorator==5.1.1
7-
exceptiongroup==1.0.4
8-
executing==1.2.0
5+
importlib-metadata==4.8.3
96
iniconfig==1.1.1
10-
ipdb==0.13.11
11-
ipython==8.7.0
12-
jedi==0.18.2
13-
matplotlib-inline==0.1.6
14-
numpy==1.23.5
15-
packaging==22.0
16-
parso==0.8.3
7+
ipdb==0.13.9
8+
ipython==7.16.3
9+
ipython-genutils==0.2.0
10+
jedi==0.17.2
11+
-e git+ssh://git@github.com/escherba/python-metrohash.git@c0cd7cbc69058a884df7cc424d550e206d1476a9#egg=metrohash
12+
numpy==1.19.5
13+
packaging==21.3
14+
parso==0.7.1
1715
pexpect==4.8.0
1816
pickleshare==0.7.5
17+
pkg_resources==0.0.0
1918
pluggy==1.0.0
20-
prompt-toolkit==3.0.36
19+
prompt-toolkit==3.0.28
2120
ptyprocess==0.7.0
22-
pure-eval==0.2.2
23-
py-cpuinfo==9.0.0
24-
Pygments==2.13.0
25-
pytest==7.2.0
21+
py==1.11.0
22+
py-cpuinfo==8.0.0
23+
Pygments==2.11.2
24+
pyparsing==3.0.7
25+
pytest==7.0.1
2626
six==1.16.0
27-
stack-data==0.6.2
28-
tomli==2.0.1
29-
traitlets==5.7.1
27+
toml==0.10.2
28+
tomli==1.2.3
29+
traitlets==4.3.3
30+
typing_extensions==4.1.1
3031
wcwidth==0.2.5
32+
zipp==3.6.0

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def get_system_bits():
117117
),
118118
]
119119

120-
VERSION = "0.3.3"
120+
VERSION = "0.4.0"
121121
URL = "https://github.com/escherba/python-metrohash"
122122

123123

@@ -162,6 +162,8 @@ def get_long_description(relpath, encoding="utf-8"):
162162
"Programming Language :: Python :: 3.9",
163163
"Programming Language :: Python :: 3.10",
164164
"Programming Language :: Python :: 3.11",
165+
"Programming Language :: Python :: 3.12",
166+
"Programming Language :: Python :: 3.13",
165167
"Topic :: Scientific/Engineering :: Information Analysis",
166168
"Topic :: Software Development :: Libraries",
167169
"Topic :: System :: Distributed Computing",

0 commit comments

Comments
 (0)