Skip to content

Commit c28ba15

Browse files
committed
[F] Fixed rasterize.cpp numpy>2 error.
1 parent 806b00e commit c28ba15

8 files changed

Lines changed: 82 additions & 30561 deletions

File tree

.github/workflows/release.yml

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ on:
1212
required: true
1313

1414
jobs:
15-
Release:
15+
release:
1616
runs-on: [self-hosted, unicorn]
17-
strategy:
18-
matrix:
19-
python-version:
20-
- "3.10"
21-
- "3.12"
17+
env:
18+
CIBW_BUILD: "cp310-* cp311-* cp312-*"
19+
CIBW_SKIP: "pp* *-musllinux_*"
20+
CIBW_ARCHS: "x86_64"
21+
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
22+
2223
steps:
2324
- name: Checkout repo
2425
uses: actions/checkout@v4
@@ -27,31 +28,50 @@ jobs:
2728
token: ${{ secrets.CI_PAT_DS }}
2829
fetch-depth: 0
2930

30-
- name: Set up Python ${{ matrix.python-version }}
31+
- name: Set up Python (host)
3132
uses: actions/setup-python@v5
3233
with:
3334
check-latest: true
34-
python-version: ${{ matrix.python-version }}
35+
python-version: "3.12"
3536

36-
- name: Update Python version
37+
- name: Bump package version
3738
run: |
3839
sed -i "s/__version__ = '[0-9]\+\(\.[0-9]\+\)\{1,2\}\(rc[0-9]\+\|[ab][0-9]\+\)\?'/__version__ = '${{ github.event.inputs.version_tag }}'/g" pyface/__init__.py
3940
40-
- name: Commit & Push changes of Version Updating
41+
- name: Commit & Push version bump
4142
uses: actions-js/push@master
4243
with:
4344
branch: ${{ github.event.inputs.branch }}
4445
message: "[C] Update package version"
4546
github_token: ${{ secrets.CI_PAT_DS }}
4647

47-
- name: Build wheel
48+
- name: Install build tooling
49+
run: |
50+
python -m pip install -U pip
51+
python -m pip install -U build twine cibuildwheel
52+
53+
- name: Build sdist (PEP 517)
54+
run: |
55+
rm -rf dist build *.egg-info wheelhouse
56+
python -m build --sdist
57+
58+
- name: Build manylinux wheels with cibuildwheel
4859
run: |
49-
python -m pip install setuptools wheel twine
50-
python setup.py bdist_wheel
51-
python -m twine upload dist/*.whl
60+
python -m cibuildwheel --platform linux --output-dir wheelhouse
5261
53-
- name: Create Release
54-
id: create_release
62+
- name: List artifacts
63+
run: |
64+
echo "== dist =="
65+
ls -al dist || true
66+
echo "== wheelhouse =="
67+
ls -al wheelhouse || true
68+
69+
- name: Twine check & upload to PyPI
70+
run: |
71+
python -m twine check dist/* wheelhouse/*
72+
python -m twine upload --skip-existing dist/* wheelhouse/*
73+
74+
- name: Create GitHub Release (attach sdist & wheels)
5575
uses: ncipollo/release-action@v1
5676
with:
5777
tag: ${{ github.event.inputs.version_tag }}
@@ -64,8 +84,10 @@ jobs:
6484
prerelease: false
6585
generateReleaseNotes: true
6686
discussionCategory: General
67-
artifacts: "${{ github.workspace }}/dist/pyface_docsaid-*-none-any.whl"
87+
artifacts: |
88+
${{ github.workspace }}/dist/*.tar.gz
89+
${{ github.workspace }}/wheelhouse/*.whl
6890
69-
- name: Clean wheel
70-
run: |
71-
rm -fr ${{ github.workspace }}/dist/*
91+
- name: Clean artifacts
92+
if: always()
93+
run: rm -rf dist wheelhouse build *.egg-info

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,7 @@ cython_debug/
169169

170170
# PyPI configuration file
171171
.pypirc
172-
.python-version
172+
.python-version
173+
174+
pyface/components/face_depth/Sim3DR/rasterize.c
175+
pyface/components/face_depth/Sim3DR/rasterize.cpp

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.md LICENSE
2+
recursive-include pyface/components/face_depth/Sim3DR *.pyx *.pxd *.h *.cpp

pyface/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .object import *
44
from .utils import download_models
55

6-
__version__ = "0.1.0"
6+
__version__ = "0.1.2"

0 commit comments

Comments
 (0)