未验证 提交 c1ca98cf 编写于 作者: A Andrey Senyaev 提交者: GitHub

Merge pull request #596 from asenyaev/asen/config_version

Changed a path to config-X.py file after python limited API support, optimized workflows
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -385,8 +385,8 @@ class RearrangeCMakeOutput(object):
# 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():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册