Skip to content

Commit 01ca910

Browse files
author
dn.petrov
committed
asdf
1 parent 5f9de73 commit 01ca910

15 files changed

+67
-53
lines changed

.github/actions/linux_armv7l/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/nikteliy/manylinux_2_24_armv7l:python3.7
1+
FROM ghcr.io/nikteliy/manylinux_2_24_armv7l:python3.8
2+
3+
RUN /usr/local/bin/python3.8 -m pip install --upgrade pip setuptools
24

35
COPY entrypoint.sh /entrypoint.sh
46
RUN chmod +x /entrypoint.sh

.github/actions/prepare_snap7/action.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,12 @@ runs:
3131

3232
- name: Update wheel
3333
shell: bash
34-
run: python3 -m pip install --upgrade pip wheel build
34+
if: ${{ runner.os != 'macOS'}}
35+
run: python3 -m pip install --upgrade pip wheel build setuptools
36+
37+
- name: Update wheel
38+
shell: bash
39+
if: ${{ runner.os == 'macOS'}}
40+
run: |
41+
python3 -m ensurepip
42+
python3 -m pip install --upgrade pip wheel build setuptools --break-system-packages

.github/build_scripts/build_package.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ make -f "${INPUT_MAKEFILE}" install
66
popd
77
mkdir -p snap7/lib/
88
cp /usr/lib/libsnap7.so snap7/lib/
9-
${INPUT_PYTHON} -m pip install wheel build auditwheel patchelf
10-
${INPUT_PYTHON} -m build . --wheel -C="--build-option=--plat-name=${INPUT_PLATFORM}"
9+
${INPUT_PYTHON} -m pip install --upgrade pip wheel build auditwheel patchelf
10+
${INPUT_PYTHON} -m build . --wheel -C="--plat-name=${INPUT_PLATFORM}"
1111

12-
auditwheel repair dist/*${INPUT_PLATFORM}.whl --plat ${INPUT_PLATFORM} -w ${INPUT_WHEELDIR}
12+
auditwheel repair dist/*.whl --plat ${INPUT_PLATFORM} -w ${INPUT_WHEELDIR}

.github/workflows/build-and-test-arm32v7.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: build-and-test-wheels-arm32
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
linux-build-arm32v7:
99
name: Build arm32 wheel
@@ -26,7 +26,7 @@ jobs:
2626
script: ./.github/build_scripts/build_package.sh
2727
platform: manylinux_2_24_armv7l
2828
makefile: arm_v7_linux.mk
29-
python: /usr/local/bin/python3
29+
python: /usr/local/bin/python3.8
3030

3131
- name: Upload artifacts
3232
uses: actions/upload-artifact@v3
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
43+
python-version: ["3.8", "3.9", "3.10", "3.11"]
4444
steps:
4545
- name: Checkout
4646
uses: actions/checkout@v3
@@ -61,7 +61,7 @@ jobs:
6161
docker run --platform linux/arm/v7 --rm --interactive -v $PWD/tests:/tests \
6262
-v $PWD/pyproject.toml:/pyproject.toml \
6363
-v $PWD/wheelhouse:/wheelhouse \
64-
"arm32v7/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF
64+
"arm32v7/python:${{ matrix.python-version }}-bookworm" /bin/bash -s <<EOF
6565
python -m pip install pytest pytest-asyncio $(ls wheelhouse/*manylinux_2_24_armv7l.whl)
6666
python -m pytest tests/ -m "server or util or client or mainloop or partner"
6767
EOF

.github/workflows/build-and-test-arm64.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: build-and-test-wheels-arm64
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
linux-build-aarch64:
99
name: Build wheel for linux arm64
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
43+
python-version: ["3.8", "3.9", "3.10", "3.11"]
4444
steps:
4545
- name: Checkout
4646
uses: actions/checkout@v3
@@ -61,7 +61,7 @@ jobs:
6161
docker run --rm --interactive -v $PWD/tests:/tests \
6262
-v $PWD/pyproject.toml:/pyproject.toml \
6363
-v $PWD/wheelhouse:/wheelhouse \
64-
"arm64v8/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF
64+
"arm64v8/python:${{ matrix.python-version }}-bookworm" /bin/bash -s <<EOF
6565
python3 -m pip install $(ls wheelhouse/*_aarch64.whl)
6666
python3 -m pip install pytest pytest-asyncio
6767
python -m pytest tests/ -m "server or util or client or mainloop or partner"

.github/workflows/build-and-test.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: build-and-test-wheels
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
linux-build-86_64:
99
name: Build wheel for linux x86_64
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
mkdir -p snap7/lib/
4646
Copy-Item .\snap7-full-1.4.2\release\Windows\Win64\snap7.dll .\snap7\lib
47-
python3 -m build . --wheel -C="--build-option=--plat-name=win_amd64"
47+
python3 -m build . --wheel -C="--plat-name=win_amd64"
4848
mkdir -p wheelhouse/${{ runner.os }}/
4949
cp dist/*.whl wheelhouse/${{ runner.os }}/
5050
@@ -78,7 +78,7 @@ jobs:
7878
7979
- name: Build wheel
8080
run: |
81-
python3 -m build . --wheel -C="--build-option=--plat-name=macosx_10_9_universal2"
81+
python3 -m build . --wheel -C="--plat-name=macosx_10_9_universal2"
8282
mkdir -p wheelhouse/${{ runner.os }}/
8383
cp dist/*.whl wheelhouse/${{ runner.os }}/
8484
@@ -96,8 +96,8 @@ jobs:
9696
runs-on: ${{ matrix.os }}
9797
strategy:
9898
matrix:
99-
os: [ubuntu-latest, windows-latest, macos-latest]
100-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
99+
os: [ubuntu-latest, windows-latest, macos-11]
100+
python-version: ["3.8", "3.9", "3.10", "3.11"]
101101
steps:
102102
- name: Checkout
103103
uses: actions/checkout@v3
@@ -110,7 +110,7 @@ jobs:
110110
- name: Install pytest
111111
run: |
112112
python3 -m pip install --upgrade pip
113-
python3 -m pip install pytest pytest-asyncio
113+
python3 -m pip install pytest pytest-asyncio setuptools
114114
115115
- name: Download artifacts
116116
uses: actions/download-artifact@v3

.github/workflows/linux.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Linux Test all Pythons
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
build:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-24.04
1010
strategy:
1111
matrix:
12-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v3
@@ -22,12 +22,13 @@ jobs:
2222
sudo apt-get install -y libsnap7-dev libsnap7-1
2323
- uses: actions/checkout@v3
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install dependencies
2929
run: |
3030
python3 -m pip install --upgrade pip
31+
python3 -m pip install --upgrade setuptools
3132
python3 -m pip install .[test]
3233
- name: Run pytest
3334
run: |

.github/workflows/mypy.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Mypy
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
build:
99
runs-on: ubuntu-20.04
@@ -14,5 +14,6 @@ jobs:
1414
run: |
1515
sudo apt-get update -qq
1616
sudo apt-get install -y python3-pip
17+
python3 -m pip install --upgrade setuptools
1718
- name: Run mypy
1819
run: make mypy

.github/workflows/osx.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
name: OS X Test
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
osx_wheel:
99
runs-on: macos-11
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: Install snap7
1414
run: brew install snap7
1515
- name: Upgrade pip
16-
run: python3 -m pip install --upgrade pip
16+
run: |
17+
python3 -m pip install --upgrade pip setuptools --break-system-packages
1718
- name: Install python-snap7
18-
run: python3 -m pip install .[test]
19+
run: python3 -m pip install -e .[test] --break-system-packages
1920
- name: Run pytest
2021
run: |
2122
pytest -m "server or util or client or mainloop"

.github/workflows/pre-commit.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: pre-commit
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
pre-commit:
99
runs-on: ubuntu-latest

.github/workflows/test-pypi-packages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
matrix:
88
os: [ubuntu-latest, macos-latest, windows-latest]
9-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
9+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v3

.github/workflows/windows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Windows Test
22
on:
33
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
4+
# branches: [master]
5+
# pull_request:
6+
# branches: [master]
77
jobs:
88
windows_wheel:
99
continue-on-error: true

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This is a ctypes based python wrapper for snap7. Snap7 is an open source,
55
32/64 bit, multi-platform Ethernet communication suite for interfacing natively
66
with Siemens S7 PLCs.
77

8-
Python-snap7 is tested with Python 3.7+, on Windows, Linux and OS X.
8+
Python-snap7 is tested with Python 3.8+, on Windows, Linux and OS X.
99

1010
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
1111

doc/introduction.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ python-snap7 is a Python wrapper for the
66
32/64 bit, multi-platform Ethernet communication suite for interfacing natively
77
with Siemens S7 PLCs.
88

9-
Python-snap7 is developer for snap7 1.1.0 and Python 3.7+. It is tested
9+
Python-snap7 is developer for snap7 1.1.0 and Python 3.8+. It is tested
1010
on Windows (10 64 bit), OSX 10.15 and Linux, but it may work on other operating
11-
systems. Python Versions <3.7 may work, but is not supported anymore.
11+
systems. Python Versions <3.8 may work, but is not supported anymore.
1212

1313
The project development is centralized on `github <https://github.com/gijzelaerr/python-snap7>`_.

pyproject.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[build-system]
2-
requires = ["setuptools>=68.0.0", "wheel"]
2+
# NOTE:
3+
requires = ["setuptools>=69.4.2", "wheel"]
34
build-backend = "setuptools.build_meta"
45

56
[project]
@@ -17,14 +18,14 @@ classifiers = [
1718
"Intended Audience :: Manufacturing",
1819
"License :: OSI Approved :: MIT License",
1920
"Operating System :: POSIX",
20-
"Programming Language :: Python :: 3.7",
2121
"Programming Language :: Python :: 3.8",
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
2526
]
2627
license = {text = "MIT"}
27-
requires-python = ">=3.7"
28+
requires-python = ">=3.8"
2829

2930
[project.urls]
3031
Homepage = "https://github.com/gijzelaerr/python-snap7"
@@ -74,7 +75,7 @@ select = [
7475
show-source = true
7576
line-length = 130
7677
ignore = []
77-
target-version = "py37"
78+
target-version = "py38"
7879

7980
[tool.ruff.mccabe]
8081
max-complexity = 10

0 commit comments

Comments
 (0)