Skip to content

Commit 42ac3ea

Browse files
authored
Merge pull request #480 from opencv/master
Update build process & sync master and 3.4
2 parents 23b92eb + 88c1735 commit 42ac3ea

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

Diff for: .github/workflows/build_wheels.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,27 @@ jobs:
244244
name: wheels
245245
path: dist/opencv*.tar.gz
246246

247+
test_release_opencv_python:
248+
if: github.event_name == 'release' && github.event.release.prerelease
249+
needs: [build, build-windows-x86_64, build_sdist]
250+
runs-on: ubuntu-latest
251+
environment: test-opencv-python-release
252+
defaults:
253+
run:
254+
shell: bash
255+
steps:
256+
- uses: actions/download-artifact@v2
257+
with:
258+
name: wheels
259+
path: wheelhouse/
260+
261+
- name: Upload all wheels
262+
run: |
263+
python -m pip install twine
264+
python -m twine upload --repository testpypi -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing wheelhouse/opencv_*
265+
247266
release_opencv_python:
248-
if: startsWith(github.ref, 'refs/tags/v')
267+
if: github.event_name == 'release' && !github.event.release.prerelease
249268
needs: [build, build-windows-x86_64, build_sdist]
250269
runs-on: ubuntu-latest
251270
environment: opencv-python-release
@@ -257,6 +276,7 @@ jobs:
257276
with:
258277
name: wheels
259278
path: wheelhouse/
279+
260280
- name: Upload wheels for opencv_python
261281
run: |
262282
python -m pip install twine
@@ -273,7 +293,6 @@ jobs:
273293
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-*
274294
275295
- name: Upload wheels for opencv_contrib_python_headless
276-
277296
run: |
278297
python -m pip install twine
279298
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python_headless-*

Diff for: pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ requires = [
33
"setuptools", "wheel", "scikit-build", "cmake", "pip",
44
"numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64'",
55
"numpy==1.19.3; python_version>='3.6' and sys_platform == 'linux' and platform_machine == 'aarch64'",
6+
"numpy==1.20.1; python_version>='3.6' and sys_platform == 'darwin' and platform_machine == 'aarch64'",
67
"numpy==1.14.5; python_version=='3.7' and platform_machine != 'aarch64'",
78
"numpy==1.17.3; python_version=='3.8' and platform_machine != 'aarch64'",
89
"numpy==1.19.3; python_version>='3.9' and platform_machine != 'aarch64'"

Diff for: setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ def main():
3131
if sys.version_info[:2] >= (3, 9):
3232
minimum_supported_numpy = "1.19.3"
3333

34-
# arm64 is a special case
35-
if sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
34+
# linux arm64 is a special case
35+
if sys.platform.startswith("linux") and sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
3636
minimum_supported_numpy = "1.19.3"
3737

38+
# macos arm64 is a special case
39+
if sys.platform == "darwin" and sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
40+
minimum_supported_numpy = "1.20.1"
41+
3842
numpy_version = "numpy>=%s" % minimum_supported_numpy
3943

4044
python_version = cmaker.CMaker.get_python_version()

0 commit comments

Comments
 (0)