Skip to content

Commit

Permalink
Merged PR 29616: Preparation for pypylon 4.1.0 release
Browse files Browse the repository at this point in the history
Switched to pylon 8.0.1 release version
Add support for multi version wheels on all platforms with python 3.9 as minimum
Merged PylonImage AttachUserBuffer feature and made it limited api compilant
  • Loading branch information
bjoernrennfanz committed Nov 22, 2024
2 parents 8b157d9 + 717b7c0 commit 9c85f7f
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"linux-x86_64": {
"pylon_sdks": ["7.5.0.15658"]
"pylon_sdks": ["8.0.1.16188"]
},
"linux-aarch64": {
"pylon_sdks": ["7.5.0.15658"]
"pylon_sdks": ["8.0.1.16188"]
},
"windows": {
"pylon_sdks": ["7.5.0.15658"]
"pylon_sdks": ["8.0.1.16188"]
},
"macos": {
"pylon_sdks": ["7.3.1.0011"]
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
strategy:
fail-fast: false
matrix:
a: [cp39, cp3_10, cp3_11, cp3_12]
a: [cp39]
p: [manylinux_2_31_x86_64, manylinux_2_31_aarch64]

env:
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.9 - 3.12"
python-version: "3.9"

- uses: actions/download-artifact@v4
with:
Expand All @@ -172,11 +172,11 @@ jobs:
run: |
cd pylon-installer
ren Basler-pylon-*.exe Basler-pylon.exe
$process = Start-Process Basler-pylon.exe -Wait -ArgumentList '/quiet /install=GigE_Runtime;USB_Runtime;Camera_Link_Runtime;GenTL_Consumer_Support;CamEmu_Support;SDKs;DataProcessing_SDK;DataProcessing_vTools' -PassThru
$process = Start-Process Basler-pylon.exe -Wait -ArgumentList '/quiet /install=GigE_Runtime;USB_Runtime;Camera_Link_Runtime;GenTL_Consumer_Support;CamEmu_Support;SDKs;DataProcessing_SDK;DataProcessing_vTools;DataProcessing_AI;DataProcessing_CREATOR' -PassThru
Write-Host "Process finished with return code:" $process.ExitCode
- name: Build wheels
uses: pypa/cibuildwheel@v2.19
uses: pypa/cibuildwheel@v2.21.3

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.9 - 3.12"
python-version: "3.9"

- uses: actions/download-artifact@v4
with:
Expand All @@ -226,7 +226,7 @@ jobs:
hdiutil detach /Volumes/pylon\ *\ Camera\ Software\ Suite
- name: Build wheels
uses: pypa/cibuildwheel@v2.19
uses: pypa/cibuildwheel@v2.21.3
env:
PYLON_FRAMEWORK_ARM64: /Library/Frameworks
PYLON_FRAMEWORK_X86_64: /Library/Frameworks
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ Please note that the pylon Camera Software Suite may support different operating
For latest information on pylon refer to: https://www.baslerweb.com/en/software/pylon/
In addition, check the release notes of your pylon installation.
For instance:
* pylon Camera Software Suite 7.5.0 supports Windows 10/11 64 bit, Linux x86_64 and Linux aarch64 with glibc version >= 2.31 or newer.
* pylon Camera Software Suite 8.0.1 supports Windows 10/11 64 bit, Linux x86_64 and Linux aarch64 with glibc version >= 2.31 or newer.
* pylon vTools are supported on pylon 7.0.0 and newer.
* pylon vTools are supported on pypylon 3.0 and newer only on Windows 10/11 64 bit, Linux x86_64 and Linux aarch64.
* For pylon vTools that require a license refer to: https://www.baslerweb.com/en/software/pylon-vtools/
* CXP-12: To use CXP with pypylon >= 4.0.0 you need to install the CXP GenTL producer and drivers using the pylon Camera Software Suite setup.
* For accessing Basler 3D cameras, e.g. Basler blaze, installation of pylon Camera Software Suite 7.5.0
* For accessing Basler 3D cameras, e.g. Basler blaze, installation of pylon Camera Software Suite 8.0.1
and the latest pylon Supplementary Package for blaze is required.

## Binary Installation
Expand Down Expand Up @@ -152,7 +152,7 @@ You need a few more things to compile pypylon:
* An installation of pylon SDK for your platform
* A compiler for your system (Visual Studio on Windows, gcc on linux, xCode commandline tools on macOS)
* Python development files (e.g. `sudo apt install python-dev` on linux)
* [swig](http://www.swig.org) >= 4.0
* [swig](http://www.swig.org) >= 4.2
* For all 64bit platforms you can install the tool via `pip install swig`

To build pypylon from source:
Expand Down
11 changes: 10 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
Version 4.x.x
- Date xxxx-xx-xx
- Updated to pylon Camera Software Suite 8.0.1 on linux and windows.
This contains pylon C++ SDK 9.0.3 and pylon Data Processing C++ SDK 3.0.1.
- We now use python 3.9 limited api to provide multi abi version wheels of pypylon.
- Removed PylonImage.AttachUserBuffer
- Added PylonImage.AttachMemoryView
- Added PylonImage.AttachArray

Version 4.0.0
- Date 2024-07-08
- Updated to pylon Camera Software Suite 7.5 on linux and windows.
This contains pylon SDK 8.0.0 and pylon Data Processing SDK 2.0.0.
This contains pylon C++ SDK 8.0.0 and pylon Data Processing C++ SDK 2.0.0.
- Removed pylon CXP GenTL Producer files from windows wheel packages.
The CXP-12 support is automatically available when the
pylon Camera Software Suite 7.5 with CXP is installed.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=42", "swig>=4.2", "wheel"]
requires = ["setuptools>=42,<72", "swig>=4.2", "wheel"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
Expand All @@ -9,7 +9,7 @@ test-requires = "pytest numpy"

[tool.cibuildwheel.windows]
archs = "AMD64"
build = "*-win_*"
build = "cp39-win_*"
before-all = 'echo "Building: %CIBW_BUILD%"'
test-command = [
'''
Expand All @@ -19,7 +19,7 @@ test-command = [

[tool.cibuildwheel.macos]
archs = "x86_64 arm64"
build = "*-macosx_*"
build = "cp39-macosx_*"
before-all = 'echo "Building: $CIBW_BUILD"'
repair-wheel-command = ""
test-command = [
Expand Down
17 changes: 8 additions & 9 deletions scripts/build/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ARG QEMU_TARGET_ARCH
ARG DOCKER_BASE_IMAGE

#the following lines are used to get a qemu binary only with docker tools
FROM multiarch/qemu-user-static:4.2.0-6 as qemu

FROM $DOCKER_BASE_IMAGE
ARG CMD_WRAPPER
ARG QEMU_TARGET_ARCH
COPY --from=qemu /usr/bin/* /usr/bin/

# Quick fix for the now archived debian jessie. Security updates are also no longer provided for arm64.
Expand All @@ -20,21 +20,20 @@ RUN if cat /etc/debian_version | grep -q "8\." ; then \
# auditwheel is limited to 5.1.2 because since 5.2.1 it requires patchelf >= 0.14 which is not available on our debian base images
RUN pip install wheel 'auditwheel<=5.1.2'

# build a new swig
RUN mkdir /build && \
cd /build && \
wget http://prdownloads.sourceforge.net/swig/swig-4.0.1.tar.gz && \
tar -xzf swig-4.0.1.tar.gz && cd swig-4.0.1 && \
./configure --with-python3 && make -j2 && make install && \
rm -rf /build
# install swig from pypi
RUN pip install swig>=4.2
# install setuptools
RUN pip install "setuptools<72" --upgrade

# numpy is required for the pypylon unittests
# currently disabled because the numpy install exceeds the current travis max duration
# RUN pip install numpy

# one genicam unittest requires a french locale
# patchelf, unzip are needed for auditwheel
RUN apt-get update && apt-get install -y locales patchelf unzip\
# symlink for libicuuc.so.66 needed for pylon
RUN apt-get update && apt-get install -y locales patchelf unzip libicu67\
&& ln -s /usr/lib/$QEMU_TARGET_ARCH-linux-gnu/libicuuc.so.67 /usr/lib/$QEMU_TARGET_ARCH-linux-gnu/libicuuc.so.66\
&& rm -rf /var/lib/apt/lists/* \
&& sed -i 's/^# *\(fr_FR.UTF-8\)/\1/' /etc/locale.gen \
&& locale-gen
Expand Down
14 changes: 6 additions & 8 deletions scripts/build/Dockerfile.manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ FROM $DOCKER_BASE_IMAGE
COPY --from=qemu /usr/bin/* /usr/bin/


#build a new swig
RUN mkdir /build && \
cd /build && \
curl -sSfL -O http://prdownloads.sourceforge.net/swig/swig-4.0.1.tar.gz && \
tar -xzf swig-4.0.1.tar.gz && cd swig-4.0.1 && \
./configure --with-python3 && make -j2 && make install && \
rm -rf /build
# install pip from pypi
RUN pip install swig>=4.2

# install setuptools
RUN pip install "setuptools<72" --upgrade

# one genicam unittest requires a french locale
RUN yum -y reinstall glibc-common
Expand All @@ -24,4 +22,4 @@ RUN mkdir /pylon_installer
RUN mkdir /worker_home && chmod go+rwx /worker_home
ENV HOME=/worker_home

RUN uname -a
RUN uname -a
5 changes: 3 additions & 2 deletions scripts/build/build-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ if [ $BUILD_DISTRO = "debian" ]; then
cp39) BASE_IMAGE32="python:3.9.16-buster"; BASE_IMAGE64="python:3.9.16-bullseye" ;;
cp3_10) BASE_IMAGE32="python:3.10.11-buster"; BASE_IMAGE64="python:3.10.11-bullseye" ;;
cp3_11) BASE_IMAGE32="python:3.11.3-buster"; BASE_IMAGE64="python:3.11.3-bullseye" ;;
cp3_12) BASE_IMAGE64="python:3.12.4-bullseye" ;;
cp3_12) BASE_IMAGE64="python:3.12.4-bullseye" ;;
cp3_13) BASE_IMAGE64="python:3.13.0-bullseye" ;;
*)
echo "Unsupported abi '$ABI_TAG'. Supported tags: cp36m, cp37m, cp38, cp39, cp3_10, cp3_11, cp3_12"
echo "Unsupported abi '$ABI_TAG'. Supported tags: cp36m, cp37m, cp38, cp39, cp3_10, cp3_11, cp3_12, cp3_13"
exit 1
esac
else
Expand Down
Loading

0 comments on commit 9c85f7f

Please sign in to comment.