forked from teboli/chromatic_aberration_filtering
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement support for *meson* build.
- Loading branch information
Showing
15 changed files
with
488 additions
and
31,478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Build | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
linux: | ||
name: Build Wheels on Linux | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- build: CPython 3.10 x86 64 bits | ||
python: cp310-manylinux_x86_64 | ||
arch: x86_64 | ||
- build: CPython 3.11 x86 64 bits | ||
python: cp311-manylinux_x86_64 | ||
arch: x86_64 | ||
- build: CPython 3.12 x86 64 bits | ||
python: cp312-manylinux_x86_64 | ||
arch: x86_64 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.20.0 | ||
shell: bash | ||
- name: Build Wheel | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
shell: bash | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }} | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_TEST_COMMAND: 'pip install "numpy>= 1.24, <2" && time python -c "import numpy as np;from chromatic_aberration_correction import correct_chromatic_aberration;RGB = np.random.random([2160, 3840, 3]).astype(np.float32);correct_chromatic_aberration(RGB, 4, 4, np.array([-0.25, 1.375, -0.125], np.float32), 15.0 / 255, 0.5, 1.0, 1.0, 0.25, 128.0 / 255, 64.0 / 255)"' | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.python }} | ||
path: ./wheelhouse/*.whl | ||
|
||
macos: | ||
name: Build Wheels on macOS | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- build: CPython 3.10 ARM 64 bits | ||
python: cp310-macosx_arm64 | ||
arch: arm64 | ||
- build: CPython 3.11 ARM 64 bits | ||
python: cp311-macosx_arm64 | ||
arch: arm64 | ||
- build: CPython 3.12 ARM 64 bits | ||
python: cp312-macosx_arm64 | ||
arch: arm64 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- name: Install Dependencies | ||
run: | | ||
brew install libomp llvm | ||
- name: Environment Variables | ||
run: | | ||
echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV | ||
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.20.0 | ||
shell: bash | ||
- name: Build Wheel | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
shell: bash | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }} | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_TEST_COMMAND: 'pip install "numpy>= 1.24, <2" && time python -c "import numpy as np;from chromatic_aberration_correction import correct_chromatic_aberration;RGB = np.random.random([2160, 3840, 3]).astype(np.float32);correct_chromatic_aberration(RGB, 4, 4, np.array([-0.25, 1.375, -0.125], np.float32), 15.0 / 255, 0.5, 1.0, 1.0, 0.25, 128.0 / 255, 64.0 / 255)"' | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.python }} | ||
path: ./wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*.pyc | ||
*.pyo | ||
.DS_Store | ||
poetry.lock | ||
/build/ | ||
/dist/ | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
from .filter_cython import chromatic_removal | ||
from .chromatic_aberration_correction import correct_chromatic_aberration | ||
|
||
chromatic_removal = correct_chromatic_aberration | ||
|
||
__all__ = ["correct_chromatic_aberration"] |
Oops, something went wrong.