Skip to content

Commit 9d69e31

Browse files
alexlibqwencoderCopilot
authored
Bump version to 0.3.2 and add NumPy 2.x support (#226)
* Bump version to 0.3.2 and add NumPy 2.x support - Update numpy dependency from ==1.26.4 to >=2.0.0 - Remove NPY_NO_DEPRECATED_API macro (NumPy 1.x legacy) - Update build scripts to use NumPy 2.x - Bump version to 0.3.2 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Update CI: Python 3.11+ and NumPy 2.x - Remove Python 3.10 support (cp310) - Add Python 3.13 support (cp313) - Update NumPy dependency from ==1.26.4 to >=2.0.0 - Update base Python version from 3.10 to 3.11 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * CI: Use Python 3.12 to run cibuildwheel 3.x cibuildwheel 3.x requires Python 3.11+ to run. This does not affect the versions we build wheels for. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Update build scripts for Python 3.11+ - run_cibuildwheel.sh: Build cp311, cp312, cp313 with musllinux skip - clean_venv_build.sh: Build for Python 3.11, 3.12, 3.13 (removed 3.10) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Update run_cibuildwheel.sh * CI: Add setuptools to workflow dependencies - Required for 'python setup.py prepare' step - Added to both wheel build and sdist build jobs Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Update py_bind/clean_venv_build.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix Windows build: add /std:c11 and setuptools - Add /std:c11 flag for MSVC to support C99/C11 features - Add setuptools and wheel to Windows build dependencies Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * CI: Use official cibuildwheel action v3.4.0 - Replace manual cibuildwheel setup with pypa/cibuildwheel@v3.4.0 - Simplifies workflow and uses official GitHub Action - Handles Python setup and dependencies automatically Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * CI: Update checkout action to v5 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * CI: Fix cibuildwheel version and config - Use pypa/cibuildwheel@v3.3.1 (latest stable) - Remove Python version matrix (cibuildwheel handles this via CIBW_BUILD) - Simplify test command (single CIBW_TEST_COMMAND for all platforms) - Match official cibuildwheel documentation pattern Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Add Windows MSVC compatibility define - Add /D_CRT_SECURE_NO_WARNINGS to suppress MSVC security warnings - Keep /std:c11 for C99/C11 support Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Restore platform-specific test commands for Windows compatibility Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * CI: Restore working workflow with manual setup - Return to manual Python/cibuildwheel setup (working approach) - Keep actions/checkout@v5 upgrade - Windows fix (/std:c11) already in setup.py Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * Fix Windows build: rename norm macro to vec_norm3d - The 'norm' macro conflicts with complex.h on Windows MSVC - Rename to vec_norm3d to avoid collision with C standard library - Update all usages in: vec_utils.h, vec_utils.c, multimed.c, tracking_run.c, check_imgcoord.c, check_track.c Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2c0a98e commit 9d69e31

File tree

13 files changed

+503
-497
lines changed

13 files changed

+503
-497
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest, windows-latest, macos-latest]
19-
python: ['cp310', 'cp311', 'cp312']
19+
python: ['cp311', 'cp312', 'cp313']
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323

24-
- name: Set up Python
24+
- name: Set up Python (host)
2525
uses: actions/setup-python@v5
2626
with:
27-
python-version: '3.10'
27+
python-version: '3.12'
2828

2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip
32-
python -m pip install numpy==1.26.4 cython>=3.0.0
32+
python -m pip install numpy>=2.0.0 cython>=3.0.0 setuptools wheel
3333
3434
- name: Prepare source files
3535
run: |
@@ -49,7 +49,7 @@ jobs:
4949
CIBW_ARCHS_MACOS: x86_64 arm64
5050
CIBW_ARCHS_WINDOWS: AMD64
5151
CIBW_ARCHS_LINUX: x86_64
52-
CIBW_BEFORE_BUILD_WINDOWS: "pip install numpy==1.26.4 cython>=3.0.0"
52+
CIBW_BEFORE_BUILD_WINDOWS: "pip install numpy>=2.0.0 cython>=3.0.0 setuptools wheel"
5353
CIBW_TEST_REQUIRES: pytest
5454
CIBW_TEST_COMMAND_LINUX: "python -m pytest {project}/py_bind/test/test_version.py"
5555
CIBW_TEST_COMMAND_MACOS: "python -m pytest {project}/py_bind/test/test_version.py"
@@ -66,17 +66,17 @@ jobs:
6666
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
6767

6868
steps:
69-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@v5
7070

71-
- name: Set up Python
71+
- name: Set up Python (host)
7272
uses: actions/setup-python@v5
7373
with:
74-
python-version: '3.10'
74+
python-version: '3.12'
7575

76-
- name: Install dependencies
76+
- name: Install dependencies (sdist)
7777
run: |
7878
python -m pip install --upgrade pip
79-
python -m pip install numpy==1.26.4 cython>=3.0.0 build
79+
python -m pip install numpy>=2.0.0 cython>=3.0.0 build setuptools wheel
8080
8181
- name: Prepare source files
8282
run: |

liboptv/include/vec_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ doubles.
2020
#endif
2121

2222
#define is_empty(x) isnan(x)
23-
#define norm(x,y,z) sqrt((x)*(x) + (y)*(y) + (z)*(z))
23+
#define vec_norm3d(x,y,z) sqrt((x)*(x) + (y)*(y) + (z)*(z))
2424

2525
typedef double vec3d[3];
2626

0 commit comments

Comments
 (0)