Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -25,6 +25,10 @@ concurrency:

env:
FORCE_COLOR: "1"
# only affects Windows, but easiest to set here for now
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
# don't compile Cython if we are building from source
NO_CYTHON_COMPILE: "true"

jobs:
test:
@@ -71,10 +75,11 @@ jobs:
- os: ubuntu-22.04
python: "3.11"
zmq: head
tornado: head

- os: ubuntu-24.04
python: "3.12"
tornado: head
abi: cp312

- os: ubuntu-24.04
python: "3.13"
@@ -124,9 +129,6 @@ jobs:
if: ${{ matrix.free_threading }}
run: |
echo "PYTHON_GIL=0" >> "$GITHUB_ENV"
# need prerelease Cython until 3.1 is out
echo "PIP_PRE=1" >> "$GITHUB_ENV"
echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV"
echo "EXTRA_PIP=--no-binary coverage" >> "$GITHUB_ENV"

- name: setup coverage
@@ -187,6 +189,11 @@ jobs:
echo "PYZMQ_BACKEND=${{ matrix.backend }}" >> "$GITHUB_ENV"
pip install cffi

- name: set stable ABI
if: matrix.abi
run: |
echo "PIP_CONFIG_SETTINGS=wheel.py-api=${{ matrix.abi }}" >> "$GITHUB_ENV"

- name: install libzmq-dev
if: matrix.zmq == 'head'
run: |
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -5,13 +5,13 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(
Python
COMPONENTS Interpreter Development.Module
COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT}
REQUIRED)

# Python_SOABI isn't always right when cross-compiling
# SKBUILD_SOABI seems to be
if (DEFINED SKBUILD_SOABI AND NOT "${SKBUILD_SOABI}" STREQUAL "${Python_SOABI}")
message(WARNING "SKBUILD_SOABI=${SKBUILD_SOABI} != Python_SOABI=${Python_SOABI}; likely cross-compiling, using SOABI=${SKBUILD_SOABI} from scikit-build")
message(WARNING "SKBUILD_SOABI=${SKBUILD_SOABI} != Python_SOABI=${Python_SOABI}; likely cross-compiling or Limited API, using SOABI=${SKBUILD_SOABI} from scikit-build")
set(Python_SOABI "${SKBUILD_SOABI}")
endif()

@@ -431,9 +431,16 @@ endif()

file(MAKE_DIRECTORY ${ZMQ_BACKEND_DEST})

if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "")
# set stable ABI
set(SABI_ARG "USE_SABI;${SKBUILD_SABI_VERSION}")
message(STATUS "Building with stable ABI ${Python_SOABI} for ${SKBUILD_SABI_VERSION}")
endif()

python_add_library(
${ZMQ_EXT_NAME} MODULE
WITH_SOABI
${SABI_ARG}
${ZMQ_C}
)

23 changes: 18 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -62,6 +62,11 @@ install.components = ["pyzmq"]
if.env.PYZMQ_BACKEND = "cffi"
build.requires = ["cffi"]

[[tool.scikit-build.overrides]]
if.any.env.PYZMQ_LATEST_CYTHON = true
build.requires = ["cython @ https://github.com/cython/cython/archive/HEAD.tar.gz"]


[tool.ruff]

[tool.ruff.format]
@@ -149,6 +154,10 @@ build-verbosity = "1"
enable = ["cpython-freethreading", "pypy"]
test-requires = ["pytest>=6", "importlib_metadata"]
test-command = "pytest -vsx {package}/tools/test_wheel.py"
build-frontend = "build"

[tool.cibuildwheel.environment]
NO_CYTHON_COMPILE = "true"

[tool.cibuildwheel.linux]
before-all = "bash tools/install_libzmq.sh"
@@ -195,16 +204,20 @@ repair-wheel-command = """\
"cmake.define.ZMQ_HAVE_IPC" = "OFF"
"cmake.define.POLLER" = "select"


# manylinux2010 for (less) old cp37-9, pp37-8
[[tool.cibuildwheel.overrides]]
select = "cp3{7,8,9}-* pp3{7,8}-*"
manylinux-x86_64-image = "manylinux2010"
manylinux-i686-image = "manylinux2010"

# build limited-api wheels for 3.12
[[tool.cibuildwheel.overrides]]
select = "cp312-*"
inherit.config-settings = "append"
config-settings."wheel.py-api" = "cp312"
before-build = "pip install abi3audit"
inherit.repair-wheel-command = "append"
repair-wheel-command = "abi3audit --strict --report {wheel}"

# note: manylinux_2_28 builds are added
# in .github/workflows/wheels.yml

[[tool.cibuildwheel.overrides]]
select = "cp313t-*"
build-frontend = "pip; args: -v --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
1 change: 1 addition & 0 deletions tools/wheel-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
abi3audit
cibuildwheel==2.23.*
delvewheel==1.10.*; sys_platform == 'win32'
Loading
Oops, something went wrong.