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
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.11"]
python-version: ["3.13"]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64

# block below based on:
# https://medium.com/ai2-blog/python-caching-in-github-actions-e9452698e98d
- uses: actions/cache@v3
- name: Cache Python environment
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pip-freeze.txt') }}
Expand Down
68 changes: 37 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,80 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-10.15]
os: [ubuntu-24.04, windows-2022, macOS-13]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Set up QEMU
if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v1.0.1
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Build wheels
# uses: joerick/cibuildwheel@v1.9.0
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.23.3
with:
output-dir: wheelhouse
env:
CIBW_BUILD: '{cp36,cp37,cp38,cp39,cp310,cp311}-{manylinux_x86_64,manylinux_aarch64,win32,win_amd64,macosx_x86_64} {cp39,cp310,cp311}-macosx_arm64'
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'
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_ARCHS_LINUX: 'auto aarch64'
CIBW_ARCHS_MACOS: 'auto arm64'
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: 'pytest -s {project}/tests'
CIBW_TEST_SKIP: '*-macosx_arm64' # Until the day Apple silicon instances are available on GitHub Actions
- uses: actions/upload-artifact@v3

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build a source distribution
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Build sdist
run: |
pip install py-cpuinfo
python setup.py build sdist
- uses: actions/upload-artifact@v3

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cibw-sdist-${{ strategy.job-index }}
path: dist/*.tar.gz

publish:
name: 'Upload to PyPI/TestPyPI'
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [build_wheels, build_sdist]
environment: ${{ github.event.inputs.repository }}
permissions:
id-token: write
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Set up built items
uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --verbose --repository ${{ github.event.inputs.repository }} dist/*
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
44 changes: 23 additions & 21 deletions pip-freeze.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
appnope==0.1.3
asttokens==2.2.1
attrs==22.1.0
attrs==21.4.0
backcall==0.2.0
Cython==0.29.32
Cython==0.29.28
decorator==5.1.1
exceptiongroup==1.0.4
executing==1.2.0
importlib-metadata==4.8.3
iniconfig==1.1.1
ipdb==0.13.11
ipython==8.7.0
jedi==0.18.2
matplotlib-inline==0.1.6
numpy==1.23.5
packaging==22.0
parso==0.8.3
ipdb==0.13.9
ipython==7.16.3
ipython-genutils==0.2.0
jedi==0.17.2
-e git+ssh://git@github.com/escherba/python-metrohash.git@c0cd7cbc69058a884df7cc424d550e206d1476a9#egg=metrohash
numpy==1.19.5
packaging==21.3
parso==0.7.1
pexpect==4.8.0
pickleshare==0.7.5
pkg_resources==0.0.0
pluggy==1.0.0
prompt-toolkit==3.0.36
prompt-toolkit==3.0.28
ptyprocess==0.7.0
pure-eval==0.2.2
py-cpuinfo==9.0.0
Pygments==2.13.0
pytest==7.2.0
py==1.11.0
py-cpuinfo==8.0.0
Pygments==2.11.2
pyparsing==3.0.7
pytest==7.0.1
six==1.16.0
stack-data==0.6.2
tomli==2.0.1
traitlets==5.7.1
toml==0.10.2
tomli==1.2.3
traitlets==4.3.3
typing_extensions==4.1.1
wcwidth==0.2.5
zipp==3.6.0
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_system_bits():
),
]

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


Expand Down Expand Up @@ -162,6 +162,8 @@ def get_long_description(relpath, encoding="utf-8"):
"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",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Distributed Computing",
Expand Down
Loading
Loading