Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Денис Петров committed May 1, 2024
1 parent d51b193 commit 678e48d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
8 changes: 7 additions & 1 deletion .github/actions/prepare_snap7/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ runs:

- name: Update wheel
shell: bash
run: python3 -m pip install --upgrade pip wheel build
if: ${{ runner.os != 'macOS' }}
run: python3 -m pip install --upgrade pip wheel build setuptools

- name: Update wheel
shell: bash
if: ${{ runner.os == 'macOS' }}
run: python3 -m pip install --upgrade pip wheel build setuptools --break-system-packages
6 changes: 3 additions & 3 deletions .github/build_scripts/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ make -f "${INPUT_MAKEFILE}" install
popd
mkdir -p snap7/lib/
cp /usr/lib/libsnap7.so snap7/lib/
${INPUT_PYTHON} -m pip install wheel build auditwheel patchelf
${INPUT_PYTHON} -m build . --wheel -C="--build-option=--plat-name=${INPUT_PLATFORM}"
${INPUT_PYTHON} -m pip install --upgrade pip wheel build auditwheel patchelf setuptools
${INPUT_PYTHON} -m build . --wheel -C="--plat-name=${INPUT_PLATFORM}"

auditwheel repair dist/*${INPUT_PLATFORM}.whl --plat ${INPUT_PLATFORM} -w ${INPUT_WHEELDIR}
auditwheel repair dist/*.whl --plat ${INPUT_PLATFORM} -w ${INPUT_WHEELDIR}
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
docker run --rm --interactive -v $PWD/tests:/tests \
-v $PWD/pyproject.toml:/pyproject.toml \
-v $PWD/wheelhouse:/wheelhouse \
"arm64v8/python:${{ matrix.python-version }}-bullseye" /bin/bash -s <<EOF
"arm64v8/python:${{ matrix.python-version }}-bookworm" /bin/bash -s <<EOF
python3 -m pip install $(ls wheelhouse/*_aarch64.whl)
python3 -m pip install pytest
python -m pytest tests/ -m "server or util or client or mainloop or partner"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: |
mkdir -p snap7/lib/
Copy-Item .\snap7-full-1.4.2\release\Windows\Win64\snap7.dll .\snap7\lib
python3 -m build . --wheel -C="--build-option=--plat-name=win_amd64"
python3 -m build . --wheel -C="--plat-name=win_amd64"
mkdir -p wheelhouse/${{ runner.os }}/
cp dist/*.whl wheelhouse/${{ runner.os }}/
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Build wheel
run: |
python3 -m build . --wheel -C="--build-option=--plat-name=macosx_10_9_universal2"
python3 -m build . --wheel -C="--plat-name=macosx_10_9_universal2"
mkdir -p wheelhouse/${{ runner.os }}/
cp dist/*.whl wheelhouse/${{ runner.os }}/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: make a virtualenv
run: python3 -m venv venv && source venv/bin/activate
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
run: python3 -m pip install --upgrade pip setuptools --break-system-packages
- name: Install python-snap7
run: python3 -m pip install .[test]
run: python3 -m pip install -e .[test] --break-system-packages
- name: Run pytest
run: |
pytest -m "server or util or client or mainloop"
Expand Down

0 comments on commit 678e48d

Please sign in to comment.