8000 Python 3.12 support. · opencv/opencv-python@ae27afe · GitHub
[go: up one dir, main page]

Skip to content

Commit ae27afe

Browse files
committed
Python 3.12 support.
1 parent ca13925 commit ae27afe

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

.github/workflows/build_wheels_linux.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
strategy:
8585
fail-fast: false
8686
matrix:
87-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
87+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
8888
platform: [x64]
8989
with_contrib: [0, 1]
9090
without_gui: [0, 1]
@@ -93,7 +93,7 @@ jobs:
9393
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
9494
MB_PYTHON_VERSION: ${{ matrix.python-version }}
9595
NP_TEST_DEP: numpy==1.19.4
96-
NP_TEST_DEP_LATEST: numpy==1.24.0
96+
NP_TEST_DEP_LATEST: numpy==1.26.0
9797
CONFIG_PATH: travis_config.sh
9898
PLAT: x86_64
9999
steps:
@@ -106,7 +106,7 @@ jobs:
106106
submodules: true
107107
fetch-depth: 0
108108
- name: Setup Environment variables
109-
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
109+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
110110
- name: Download a wheel accordingly to matrix
111111
uses: actions/download-artifact@v3
112112
with:

.github/workflows/build_wheels_linux_arm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
strategy:
8585
fail-fast: false
8686
matrix:
87-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
87+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
8888
platform: [x64]
8989
with_contrib: [0, 1]
9090
without_gui: [0, 1]
@@ -94,7 +94,7 @@ jobs:
9494
MB_PYTHON_VERSION: ${{ matrix.python-version }}
9595
PLAT: aarch64
9696
NP_TEST_DEP: numpy==1.19.4
97-
NP_TEST_DEP_LATEST: numpy==1.24.0
97+
NP_TEST_DEP_LATEST: numpy==1.26.0
9898
CONFIG_PATH: travis_config.sh
9999
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
100100
UNICODE_WIDTH: 32
@@ -108,7 +108,7 @@ jobs:
108108
submodules: true
109109
fetch-depth: 0
110110
- name: Setup Environment variables
111-
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
111+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
112112
- name: Download a wheel accordingly to matrix
113113
uses: actions/download-artifact@v3
114114
with:

.github/workflows/build_wheels_macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
strategy:
106106
fail-fast: false
107107
matrix:
108-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
108+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
109109
platform: [x64]
110110
with_contrib: [0, 1]
111111
without_gui: [0, 1]
@@ -114,7 +114,7 @@ jobs:
114114
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
115115
MB_PYTHON_VERSION: ${{ matrix.python-version }}
116116
NP_TEST_DEP: numpy==1.19.4
117-
NP_TEST_DEP_LATEST: numpy==1.24.0
117+
NP_TEST_DEP_LATEST: numpy==1.26.0
118118
CONFIG_PATH: travis_config.sh
119119
PLAT: x86_64
120120
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
@@ -134,7 +134,7 @@ jobs:
134134
python-version: ${{ matrix.python-version }}
135135
architecture: ${{ matrix.platform }}
136136
- name: Setup Environment variables
137-
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
137+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
138138
- name: Download a wheel accordingly to matrix
139139
uses: actions/download-artifact@v3
140140
with:

.github/workflows/build_wheels_macos_m1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
78+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
7979
platform: [x64]
8080
with_contrib: [0, 1]
8181
without_gui: [0, 1]

.github/workflows/build_wheels_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
strategy:
9090
fail-fast: false
9191
matrix:
92-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
92+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
9393
platform: [x86, x64]
9494
with_contrib: [0, 1]
9595
without_gui: [0, 1]

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def main():
3333
'numpy>=1.21.0; python_version<="3.9" and platform_system=="Darwin" and platform_machine=="arm64"',
3434
'numpy>=1.21.4; python_version>="3.10" and platform_system=="Darwin"',
3535
"numpy>=1.23.5; python_version>='3.11'"
36+
"numpy>=1.26.0; python_version>='3.12'"
3637
]
3738

3839
python_version = cmaker.CMaker.get_python_version()
@@ -299,6 +300,7 @@ def main():
299300
"Programming Language :: Python :: 3.9",
300301
"Programming Language :: Python :: 3.10",
301302
"Programming Language :: Python :: 3.11",
303+
"Programming Language :: Python :: 3.12",
302304
"Programming Language :: C++",
303305
"Programming Language :: Python :: Implementation :: CPython",
304306
"Topic :: Scientific/Engineering",

0 commit comments

Comments
 (0)
0