trainingsample 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.github/workflows/publish.yml +65 -17
- {trainingsample-0.2.3 → trainingsample-0.2.4}/Cargo.lock +1 -1
- {trainingsample-0.2.3 → trainingsample-0.2.4}/Cargo.toml +1 -1
- {trainingsample-0.2.3 → trainingsample-0.2.4}/PKG-INFO +1 -1
- {trainingsample-0.2.3 → trainingsample-0.2.4}/pyproject.toml +1 -1
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.cargo/config.toml +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.envrc +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.github/workflows/ci.yml +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.gitignore +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.pre-commit-config.yaml +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/.rustfmt.toml +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/BENCHMARKS.md +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/LICENSE +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/README.md +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/clippy.toml +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/docs/API_COMPAT_CV2.md +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/docs/BUILDING_STATIC_OPENCV.md +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/rust-toolchain.toml +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/scripts/build-opencv-static.sh +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/scripts/run_competitive_benchmarks.sh +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/setup-env.sh +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/core.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/cropping.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/cv_batch_ops.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/cv_batch_ops_optimized.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/cv_compat.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/format_conversion_simd.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/lib.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/loading.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/luminance.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/luminance_simd.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/opencv_ops.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/python_bindings.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/tests.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/src/true_batch_ops.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/tests/__init__.py +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/tests/comprehensive_tests.rs +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/tests/test_comprehensive.py +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/tests/test_performance_benchmarks.py +0 -0
- {trainingsample-0.2.3 → trainingsample-0.2.4}/tests/test_python_bindings.py +0 -0
|
@@ -8,10 +8,20 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
linux:
|
|
11
|
-
runs-on:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
|
|
14
|
+
include:
|
|
15
|
+
# Ubuntu 22.04 (libc 2.35)
|
|
16
|
+
- os: ubuntu-22.04
|
|
17
|
+
target: x86_64
|
|
18
|
+
manylinux: manylinux_2_35
|
|
19
|
+
python-versions: '["3.11", "3.12"]'
|
|
20
|
+
# Ubuntu 24.04 (libc 2.38)
|
|
21
|
+
- os: ubuntu-24.04
|
|
22
|
+
target: x86_64
|
|
23
|
+
manylinux: manylinux_2_38
|
|
24
|
+
python-versions: '["3.11", "3.12"]'
|
|
15
25
|
steps:
|
|
16
26
|
- uses: actions/checkout@v4
|
|
17
27
|
- uses: actions/setup-python@v5
|
|
@@ -23,40 +33,67 @@ jobs:
|
|
|
23
33
|
uses: actions/cache@v4
|
|
24
34
|
with:
|
|
25
35
|
path: third_party/opencv-static
|
|
26
|
-
key: opencv-static-4.12.0-no-itt-linux-${{
|
|
36
|
+
key: opencv-static-4.12.0-no-itt-linux-${{ matrix.os }}-${{ runner.arch }}-${{ matrix.manylinux }}
|
|
27
37
|
|
|
28
38
|
- name: Install build dependencies
|
|
29
39
|
run: |
|
|
40
|
+
# Completely remove needrestart to eliminate hanging prompts
|
|
41
|
+
sudo apt-get remove -y needrestart || true
|
|
42
|
+
export DEBIAN_FRONTEND=noninteractive
|
|
43
|
+
|
|
30
44
|
sudo apt-get update
|
|
31
|
-
# Install LLVM for opencv-rust bindings codegen
|
|
32
|
-
sudo apt-get install -y clang libclang-dev llvm-dev cmake curl
|
|
33
|
-
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
# Install basic LLVM for opencv-rust bindings codegen
|
|
46
|
+
sudo apt-get install -y clang libclang-dev llvm-dev cmake curl wget software-properties-common
|
|
47
|
+
|
|
48
|
+
# For Ubuntu 22.04, use the default LLVM 14 instead of PPA to avoid restart issues
|
|
49
|
+
if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then
|
|
50
|
+
echo "Using default LLVM 14 for Ubuntu 22.04"
|
|
51
|
+
sudo apt-get install -y llvm-14 llvm-14-dev llvm-14-tools libclang-14-dev
|
|
52
|
+
echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-14" >> $GITHUB_ENV
|
|
53
|
+
else
|
|
54
|
+
# Ubuntu 24.04 has LLVM 18 by default
|
|
55
|
+
sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
|
|
56
|
+
echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Find the correct libclang.so path and set environment variables (search only LLVM directories)
|
|
60
|
+
if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then
|
|
61
|
+
LIBCLANG_PATH="/usr/lib/llvm-14/lib"
|
|
62
|
+
else
|
|
63
|
+
LIBCLANG_PATH="/usr/lib/llvm-18/lib"
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# Verify the file exists at the expected location
|
|
67
|
+
if [ ! -f "$LIBCLANG_PATH/libclang.so" ]; then
|
|
68
|
+
# Fallback to targeted search if expected location doesn't exist
|
|
69
|
+
LIBCLANG_PATH=$(find /usr/lib/llvm* -name "libclang.so" 2>/dev/null | head -1 | xargs dirname)
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
echo "LIBCLANG_PATH=$LIBCLANG_PATH" >> $GITHUB_ENV
|
|
73
|
+
echo "LD_LIBRARY_PATH=$LIBCLANG_PATH:$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
38
74
|
# Verify the key files exist
|
|
39
|
-
|
|
40
|
-
which llvm-config-18
|
|
75
|
+
echo "Using libclang.so at: $LIBCLANG_PATH/libclang.so"
|
|
76
|
+
echo "LLVM config at: $(which llvm-config-14 2>/dev/null || which llvm-config-18 2>/dev/null)"
|
|
41
77
|
|
|
42
78
|
- name: Build static OpenCV
|
|
43
79
|
if: steps.cache-opencv.outputs.cache-hit != 'true'
|
|
44
80
|
run: |
|
|
45
81
|
./scripts/build-opencv-static.sh
|
|
46
82
|
|
|
47
|
-
- name: Build wheels
|
|
83
|
+
- name: Build wheels for multiple Python versions
|
|
48
84
|
uses: PyO3/maturin-action@v1
|
|
49
85
|
with:
|
|
50
86
|
target: ${{ matrix.target }}
|
|
51
|
-
args: --release --out dist --
|
|
87
|
+
args: --release --out dist --no-default-features --features python-bindings,simd,opencv
|
|
52
88
|
sccache: 'false'
|
|
53
89
|
container: off
|
|
90
|
+
manylinux: ${{ matrix.manylinux }}
|
|
54
91
|
env:
|
|
55
92
|
# Use stable ABI for forward compatibility
|
|
56
93
|
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
|
|
57
94
|
# LLVM for opencv-rust bindings (from earlier install step)
|
|
58
|
-
LIBCLANG_PATH:
|
|
59
|
-
LLVM_CONFIG_PATH:
|
|
95
|
+
LIBCLANG_PATH: ${{ env.LIBCLANG_PATH }}
|
|
96
|
+
LLVM_CONFIG_PATH: ${{ env.LLVM_CONFIG_PATH }}
|
|
60
97
|
# OpenCV static linking configuration
|
|
61
98
|
OPENCV_INCLUDE_PATHS: ${{ github.workspace }}/third_party/opencv-static/include/opencv4
|
|
62
99
|
OPENCV_LINK_PATHS: ${{ github.workspace }}/third_party/opencv-static/lib
|
|
@@ -66,7 +103,7 @@ jobs:
|
|
|
66
103
|
- name: Upload wheels
|
|
67
104
|
uses: actions/upload-artifact@v4
|
|
68
105
|
with:
|
|
69
|
-
name: wheels-linux-${{ matrix.target }}
|
|
106
|
+
name: wheels-linux-${{ matrix.os }}-${{ matrix.target }}
|
|
70
107
|
path: dist
|
|
71
108
|
|
|
72
109
|
|
|
@@ -147,6 +184,17 @@ jobs:
|
|
|
147
184
|
pattern: wheels-*
|
|
148
185
|
merge-multiple: true
|
|
149
186
|
path: dist
|
|
187
|
+
- name: List built wheels
|
|
188
|
+
run: |
|
|
189
|
+
echo "Built wheels:"
|
|
190
|
+
ls -la dist/
|
|
191
|
+
echo "Wheel information:"
|
|
192
|
+
for wheel in dist/*.whl; do
|
|
193
|
+
if [ -f "$wheel" ]; then
|
|
194
|
+
echo "Checking $wheel:"
|
|
195
|
+
python -c "import zipfile; print(zipfile.ZipFile('$wheel').namelist()[:3])" || echo " Could not read wheel contents"
|
|
196
|
+
fi
|
|
197
|
+
done
|
|
150
198
|
- name: Publish to PyPI
|
|
151
199
|
uses: pypa/gh-action-pypi-publish@v1.12.4
|
|
152
200
|
with:
|
|
@@ -14,7 +14,7 @@ description = "High-performance Rust reimplementation of GIL-blocking video/imag
|
|
|
14
14
|
license = {text = "MIT"}
|
|
15
15
|
name = "trainingsample"
|
|
16
16
|
requires-python = ">=3.11"
|
|
17
|
-
version = "0.2.
|
|
17
|
+
version = "0.2.4"
|
|
18
18
|
|
|
19
19
|
[project.optional-dependencies]
|
|
20
20
|
dev = ["pytest>=6.0", "pytest-benchmark", "maturin>=1.0,<2.0", "pre-commit"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|