diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 338673dc..bd42944c 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -67,33 +67,11 @@ jobs: name: wheels path: wheelhouse/opencv*.whl - - name: Saving opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} + - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v2 with: - name: opencv-python-wheels - path: wheelhouse/opencv_python-*.whl - - - name: Saving opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/opencv_python_headless-*.whl - - - name: Saving opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/opencv_contrib_python-*.whl - - - name: Saving opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels - path: wheelhouse/opencv_contrib_python_headless-*.whl + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} + path: wheelhouse/opencv*.whl test: needs: [build] @@ -130,32 +108,10 @@ jobs: - name: Setup Environment variables run: if [ "3.10" == "${{ 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 - - name: Download opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-wheels - path: wheelhouse/ - - - name: Download opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} + - name: Download a wheel accordingly to matrix uses: actions/download-artifact@v2 with: - name: opencv-contrib-python-headless-wheels + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: wheelhouse/ - name: Package installation and run tests diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 08badc5b..a97bbc29 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -67,33 +67,11 @@ jobs: name: wheels path: wheelhouse/opencv*.whl - - name: Saving opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} + - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v2 with: - name: opencv-python-wheels - path: wheelhouse/opencv_python-*.whl - - - name: Saving opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/opencv_python_headless-*.whl - - - name: Saving opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/opencv_contrib_python-*.whl - - - name: Saving opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels - path: wheelhouse/opencv_contrib_python_headless-*.whl + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} + path: wheelhouse/opencv*.whl test: needs: [build_arm] @@ -136,32 +114,10 @@ jobs: - name: Setup Environment variables run: if [ "3.10" == "${{ 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 - - name: Download opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-wheels - path: wheelhouse/ - - - name: Download opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} + - name: Download a wheel accordingly to matrix uses: actions/download-artifact@v2 with: - name: opencv-contrib-python-headless-wheels + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: wheelhouse/ - name: Package installation and run tests diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 0ff69ede..87fe6f99 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -94,33 +94,11 @@ jobs: name: wheels path: wheelhouse/opencv*.whl - - name: Saving opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} + - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v2 with: - name: opencv-python-wheels - path: wheelhouse/opencv_python-*.whl - - - name: Saving opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/opencv_python_headless-*.whl - - - name: Saving opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/opencv_contrib_python-*.whl - - - name: Saving opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels - path: wheelhouse/opencv_contrib_python_headless-*.whl + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} + path: wheelhouse/opencv*.whl test: needs: [build] @@ -175,32 +153,10 @@ jobs: - name: Setup Environment variables run: if [ "3.10" == "${{ 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 - - name: Download opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-wheels - path: wheelhouse/ - - - name: Download opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} + - name: Download a wheel accordingly to matrix uses: actions/download-artifact@v2 with: - name: opencv-contrib-python-headless-wheels + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: wheelhouse/ - name: Package installation diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index cd183389..3711e1b3 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -59,33 +59,11 @@ jobs: name: wheels path: wheelhouse/opencv*.whl - - name: Saving opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} + - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v2 with: - name: opencv-python-wheels - path: wheelhouse/opencv_python-*.whl - - - name: Saving opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/opencv_python_headless-*.whl - - - name: Saving opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/opencv_contrib_python-*.whl - - - name: Saving opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels - path: wheelhouse/opencv_contrib_python_headless-*.whl + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} + path: wheelhouse/opencv*.whl test: needs: [build] @@ -111,32 +89,10 @@ jobs: submodules: true fetch-depth: 0 - - name: Download opencv-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-wheels - path: wheelhouse/ - - - name: Download opencv-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-headless-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-wheels - path: wheelhouse/ - - - name: Download opencv-contrib-python-headless wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }} + - name: Download a wheel accordingly to matrix uses: actions/download-artifact@v2 with: - name: opencv-contrib-python-headless-wheels + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: wheelhouse/ - name: Package installation diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index ade90ead..0f697291 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -70,61 +70,11 @@ jobs: name: wheels path: wheelhouse/opencv*.whl - - name: Saving opencv-python x86 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 && matrix.platform == 'x86' }} + - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v2 with: - name: opencv-python-wheels-x86 - path: wheelhouse/opencv_python-*.whl - - - name: Saving opencv-python x64 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 && matrix.platform == 'x64' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-wheels-x64 - path: wheelhouse/opencv_python-*.whl - - - name: Saving opencv-python-headless x86 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 && matrix.platform == 'x86' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-headless-wheels-x86 - path: wheelhouse/opencv_python_headless-*.whl - - - name: Saving opencv-python-headless x64 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 && matrix.platform == 'x64' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-python-headless-wheels-x64 - path: wheelhouse/opencv_python_headless-*.whl - - - name: Saving opencv-contrib-python x86 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 && matrix.platform == 'x86' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-wheels-x86 - path: wheelhouse/opencv_contrib_python-*.whl - - - name: Saving opencv-contrib-python x64 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 && matrix.platform == 'x64' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-wheels-x64 - path: wheelhouse/opencv_contrib_python-*.whl - - - name: Saving opencv-contrib-python-headless x86 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 && matrix.platform == 'x86' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels-x86 - path: wheelhouse/opencv_contrib_python_headless-*.whl - - - name: Saving opencv-contrib-python-headless x64 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 && matrix.platform == 'x64' }} - uses: actions/upload-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels-x64 - path: wheelhouse/opencv_contrib_python_headless-*.whl + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}-${{ matrix.platform }} + path: wheelhouse/opencv* test: needs: [build-windows-x86_64] @@ -160,60 +110,10 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.platform }} - - name: Download opencv-python x86 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 && matrix.platform == 'x86' }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-wheels-x86 - path: wheelhouse/ - - - name: Download opencv-python x64 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 && matrix.platform == 'x64' }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-wheels-x64 - path: wheelhouse/ - - - name: Download opencv-python-headless x86 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 && matrix.platform == 'x86' }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-headless-wheels-x86 - path: wheelhouse/ - - - name: Download opencv-python-headless x64 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 && matrix.platform == 'x64' }} - uses: actions/download-artifact@v2 - with: - name: opencv-python-headless-wheels-x64 - path: wheelhouse/ - - - name: Download opencv-contrib-python x86 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 && matrix.platform == 'x86' }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-wheels-x86 - path: wheelhouse/ - - - name: Download opencv-contrib-python x64 wheels - if: ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 && matrix.platform == 'x64' }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-wheels-x64 - path: wheelhouse/ - - - name: Download opencv-contrib-python-headless x86 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 && matrix.platform == 'x86' }} - uses: actions/download-artifact@v2 - with: - name: opencv-contrib-python-headless-wheels-x86 - path: wheelhouse/ - - - name: Download opencv-contrib-python-headless x64 wheels - if: ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 && matrix.platform == 'x64' }} + - name: Download a wheel accordingly to matrix uses: actions/download-artifact@v2 with: - name: opencv-contrib-python-headless-wheels-x64 + name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}-${{ matrix.platform }} path: wheelhouse/ - name: Package installation diff --git a/setup.py b/setup.py index 331631ea..cef4c93f 100644 --- a/setup.py +++ b/setup.py @@ -385,8 +385,8 @@ def _classify_installed_files_override( # add lines from the old __init__.py file to the config file with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts', '__init__.py'), 'r') as custom_init: custom_init_data = custom_init.read() - with open('%spython/cv2/config-%s.%s.py' - % (cmake_install_dir, sys.version_info[0], sys.version_info[1]), 'w') as opencv_init_config: + with open('%spython/cv2/config-%s.py' + % (cmake_install_dir, sys.version_info[0]), 'w') as opencv_init_config: opencv_init_config.write(custom_init_data) for package_name, relpaths_re in cls.package_paths_re.items():