Skip to content

Commit 86c1ae3

Browse files
authored
add cp311 support (v0.3.3) (#24)
* add cp311 support (v0.3.3) * update build badge
1 parent 6ca4408 commit 86c1ae3

9 files changed

Lines changed: 72 additions & 69 deletions

File tree

.github/workflows/build.yml

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

2020
runs-on: ${{ matrix.os }}
2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v2
2323

24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
architecture: x64
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
architecture: x64
2929

30-
# block below based on:
31-
# https://medium.com/ai2-blog/python-caching-in-github-actions-e9452698e98d
32-
- uses: actions/cache@v2
33-
with:
34-
path: ${{ env.pythonLocation }}
35-
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pip-freeze.txt') }}
30+
# block below based on:
31+
# https://medium.com/ai2-blog/python-caching-in-github-actions-e9452698e98d
32+
- uses: actions/cache@v3
33+
with:
34+
path: ${{ env.pythonLocation }}
35+
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pip-freeze.txt') }}
3636

37-
- name: Install dependencies
38-
run: |
39-
pip install --upgrade --upgrade-strategy eager setuptools wheel
40-
pip install --upgrade --upgrade-strategy eager -r requirements.txt
41-
pip freeze > pip-freeze.txt
37+
- name: Install dependencies
38+
run: |
39+
pip install --upgrade --upgrade-strategy eager setuptools wheel
40+
pip install --upgrade --upgrade-strategy eager -r requirements.txt
41+
pip freeze > pip-freeze.txt
4242
43-
- name: Test with pytest
44-
run: |
45-
python setup.py build_ext --inplace
46-
pip install -e .
47-
python -m pytest
43+
- name: Test with pytest
44+
run: |
45+
python setup.py build_ext --inplace
46+
pip install -e .
47+
python -m pytest

.github/workflows/publish.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v2
2121
- name: Set up Python
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v4
2323
with:
2424
python-version: '3.9'
2525
- name: Set up QEMU
2626
if: runner.os == 'Linux'
2727
# uses: docker/setup-qemu-action@v1.0.1
28-
uses: docker/setup-qemu-action@v1.2.0
28+
uses: docker/setup-qemu-action@v2
2929
with:
3030
platforms: arm64
3131
- name: Build wheels
3232
# uses: joerick/cibuildwheel@v1.9.0
33-
uses: pypa/cibuildwheel@v2.9.0
33+
uses: pypa/cibuildwheel@v2.11.2
3434
with:
3535
output-dir: wheelhouse
3636
env:
37-
CIBW_BUILD: '{cp36,cp37,cp38,cp39,cp310}-{manylinux_x86_64,manylinux_aarch64,win32,win_amd64,macosx_x86_64} {cp39,cp310}-macosx_arm64'
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'
3838
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
3939
CIBW_ARCHS_LINUX: 'auto aarch64'
4040
CIBW_ARCHS_MACOS: 'auto arm64'
4141
CIBW_TEST_REQUIRES: pytest
4242
CIBW_TEST_COMMAND: 'pytest -s {project}/tests'
43-
# CIBW_TEST_SKIP: '*-macosx_arm64' # Until the day Apple silicon instances are available on GitHub Actions
44-
- uses: actions/upload-artifact@v2
43+
CIBW_TEST_SKIP: '*-macosx_arm64' # Until the day Apple silicon instances are available on GitHub Actions
44+
- uses: actions/upload-artifact@v3
4545
with:
4646
path: ./wheelhouse/*.whl
4747
build_sdist:
@@ -51,14 +51,14 @@ jobs:
5151
- name: Checkout
5252
uses: actions/checkout@v2
5353
- name: Set up Python
54-
uses: actions/setup-python@v2
54+
uses: actions/setup-python@v4
5555
with:
5656
python-version: '3.9'
5757
- name: Build sdist
5858
run: |
5959
pip install py-cpuinfo
6060
python setup.py build sdist
61-
- uses: actions/upload-artifact@v2
61+
- uses: actions/upload-artifact@v3
6262
with:
6363
path: dist/*.tar.gz
6464
publish:
@@ -67,11 +67,11 @@ jobs:
6767
needs: [build_wheels, build_sdist]
6868
steps:
6969
- name: Set up Python
70-
uses: actions/setup-python@v2
70+
uses: actions/setup-python@v4
7171
with:
7272
python-version: '3.9'
7373
- name: Set up built items
74-
uses: actions/download-artifact@v2
74+
uses: actions/download-artifact@v3
7575
with:
7676
name: artifact
7777
path: dist

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ target/
7575

7676
# Makefile artifacts
7777
.build_stamp
78+
79+
# Python 3.11
80+
lib64
81+
pyvenv.cfg

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Python wrapper for [MetroHash](https://github.com/jandrewrogers/MetroHash), a
44
fast non-cryptographic hash function.
55

6-
[![Build Status](https://img.shields.io/github/workflow/status/escherba/python-metrohash/build/master)](https://github.com/escherba/python-metrohash/actions/workflows/build.yml)
6+
[![Build Status](https://img.shields.io/github/actions/workflow/status/escherba/python-metrohash/build.yml?branch=master)](https://github.com/escherba/python-metrohash/actions/workflows/build.yml)
77
[![Latest
88
Version](https://img.shields.io/pypi/v/metrohash.svg)](https://pypi.python.org/pypi/metrohash)
99
[![Downloads](https://img.shields.io/pypi/dm/metrohash.svg)](https://pypistats.org/packages/metrohash)
@@ -102,7 +102,7 @@ makefile commands:
102102
``` bash
103103
git clone https://github.com/escherba/python-metrohash.git
104104
cd python-metrohash
105-
make env # create a Python virtualenv
105+
make env # create a virtual environment
106106
make test # run Python tests
107107
make cpp-test # run C++ tests
108108
make shell # enter IPython shell

pip-freeze.txt

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1+
appnope==0.1.3
2+
asttokens==2.2.1
13
attrs==22.1.0
24
backcall==0.2.0
35
Cython==0.29.32
46
decorator==5.1.1
5-
importlib-metadata==4.8.3
7+
exceptiongroup==1.0.4
8+
executing==1.2.0
69
iniconfig==1.1.1
7-
ipdb==0.13.9
8-
ipython==7.16.3
9-
ipython-genutils==0.2.0
10-
jedi==0.17.2
11-
-e git+https://github.com/escherba/python-metrohash@7df90e93a81300cead306e1b0dcd9ac178abcf44#egg=metrohash
12-
numpy==1.19.5
13-
packaging==21.3
14-
parso==0.7.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
1517
pexpect==4.8.0
1618
pickleshare==0.7.5
1719
pluggy==1.0.0
18-
prompt-toolkit==3.0.31
20+
prompt-toolkit==3.0.36
1921
ptyprocess==0.7.0
20-
py==1.11.0
21-
py-cpuinfo==8.0.0
22+
pure-eval==0.2.2
23+
py-cpuinfo==9.0.0
2224
Pygments==2.13.0
23-
pyparsing==3.0.9
24-
pytest==7.0.1
25+
pytest==7.2.0
2526
six==1.16.0
26-
toml==0.10.2
27-
tomli==1.2.3
28-
traitlets==4.3.3
29-
typing_extensions==4.1.1
27+
stack-data==0.6.2
28+
tomli==2.0.1
29+
traitlets==5.7.1
3030
wcwidth==0.2.5
31-
zipp==3.6.0

python.mk

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PYVERSION := $(shell $(INTERPRETER) --version 2>&1)
1818
PYTHON := $(PYENV) $(INTERPRETER)
1919
PIP := $(PYENV) $(PACKAGE_MGR)
2020

21-
VENV_OPTS := --python="$(shell which $(INTERPRETER))"
21+
VENV_OPTS := ""
2222
ifeq ($(PIP_SYSTEM_SITE_PACKAGES),1)
2323
VENV_OPTS += --system-site-packages
2424
endif
@@ -38,9 +38,9 @@ release: $(BUILD_STAMP) | $(ENV_STAMP) ## upload package to PyPI (deprecated)
3838
$(PYTHON) setup.py $(DISTRIBUTE) upload -r $(PYPI_URL)
3939

4040
.PHONY: shell
41-
shell: build ## open Python shell within the virtualenv
41+
shell: build ## open Python shell within the virtual environment
4242
@echo "Using $(PYVERSION)"
43-
$(PYENV) ipython
43+
$(PYENV) python
4444

4545
.PHONY: build
4646
build: $(EXTENSION_OBJS) ## build C extension(s)
@@ -81,8 +81,7 @@ install: $(BUILD_STAMP) ## install package
8181
.PHONY: env
8282
env: $(ENV_STAMP) ## set up a virtual environment
8383
$(ENV_STAMP): setup.py requirements.txt
84-
test -f $@ || virtualenv $(VENV_OPTS) env
85-
export SETUPTOOLS_USE_DISTUTILS=stdlib; $(PYENV) curl https://bootstrap.pypa.io/ez_setup.py | $(INTERPRETER)
84+
test -f $@ || $(INTERPRETER) -m venv $(VENV_OPTS) env
8685
$(PIP) install -U pip wheel
8786
export SETUPTOOLS_USE_DISTUTILS=stdlib; $(PIP) install -r requirements.txt
8887
$(PIP) freeze > pip-freeze.txt

setup.py

Lines changed: 2 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.2"
120+
VERSION = "0.3.3"
121121
URL = "https://github.com/escherba/python-metrohash"
122122

123123

@@ -161,6 +161,7 @@ def get_long_description(relpath, encoding="utf-8"):
161161
"Programming Language :: Python :: 3.8",
162162
"Programming Language :: Python :: 3.9",
163163
"Programming Language :: Python :: 3.10",
164+
"Programming Language :: Python :: 3.11",
164165
"Topic :: Scientific/Engineering :: Information Analysis",
165166
"Topic :: Software Development :: Libraries",
166167
"Topic :: System :: Distributed Computing",

src/metrohash.cpp

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/metrohash.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Python wrapper for MetroHash, a fast non-cryptographic hashing algorithm
1010

1111
__author__ = "Eugene Scherba"
1212
__email__ = "escherba+metrohash@gmail.com"
13-
__version__ = "0.3.2"
13+
__version__ = "0.3.3"
1414
__all__ = [
1515
"MetroHash64",
1616
"MetroHash128",

0 commit comments

Comments
 (0)