Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe67f8e

Browse filesBrowse files
authored
Merge pull request opencv#941 from asmorkalov/as/mac_m1_venv_for_test
Run Python test on Mac M1 in virtual environment to prevent "error: externally-managed-environment".
2 parents 8fce57f + 949b65e commit fe67f8e
Copy full SHA for fe67f8e

File tree

Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed

‎.github/workflows/build_wheels_macos_m1.yml

Copy file name to clipboardExpand all lines: .github/workflows/build_wheels_macos_m1.yml
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,25 @@ jobs:
9898
with:
9999
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
100100
path: wheelhouse/
101+
- name: Create Venv for test
102+
run: |
103+
test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test"
104+
python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test
101105
- name: Package installation
102106
run: |
103-
python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl
107+
source ${{ github.workspace }}/opencv_test/bin/activate
108+
python${{ matrix.python-version }} -m pip install --upgrade pip
109+
python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
104110
cd ${{ github.workspace }}/tests
105111
python${{ matrix.python-version }} get_build_info.py
106112
- name: Run tests
107113
run: |
114+
source ${{ github.workspace }}/opencv_test/bin/activate
108115
cd ${{ github.workspace }}/opencv
109116
python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
110117
- name: Pylint test
111118
run: |
119+
source ${{ github.workspace }}/opencv_test/bin/activate
112120
python${{ matrix.python-version }} -m pip install pylint==2.15.9
113121
cd ${{ github.workspace }}/tests
114122
python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.