pyzmq/pyproject.toml

133 lines
3.2 KiB
TOML

[tool.autoflake]
ignore-init-module-imports = true
remove-all-unused-imports = true
remove-duplicate-keys = true
# remove-unused-variables = true
[tool.black]
skip-string-normalization = true
exclude = "zmq/eventloop/minitornado|docs/source/conf.py"
[tool.isort]
profile = "black"
multi_line_output = 3
skip = [
"zmq/__init__.py"
]
[build-system]
requires = [
"setuptools",
"setuptools_scm[toml]",
"wheel",
"packaging",
"cffi; implementation_name == 'pypy'",
"cython>=0.29; implementation_name == 'cpython'",
"cython>=0.29.35; implementation_name == 'cpython' and python_version >= '3.12'",
]
build-backend = "setuptools.build_meta"
[tool.tbump]
# Uncomment this if your project is hosted on GitHub:
github_url = "https://github.com/zeromq/pyzmq"
[tool.tbump.version]
current = "25.1.2"
regex = '''
(?P<major>\d+)
\.
(?P<minor>\d+)
\.
(?P<patch>\d+)
(?P<pre>((a|b|rc|)\d+)|.dev\d*|)
'''
[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"
# For each file to patch, add a [[tool.tbump.file]] config
# section containing the path of the file, relative to the
# pyproject.toml location.
[[tool.tbump.file]]
src = "setup.py"
search = 'version="{current_version}"'
[[tool.tbump.file]]
src = "zmq/sugar/version.py"
search = '__version__: str = "{current_version}"'
[tool.cibuildwheel]
build-verbosity = "1"
test-requires = ["pytest"]
test-command = "pytest -vsx {package}/tools/test_wheel.py"
[tool.cibuildwheel.linux]
before-all = "bash tools/install_libzmq.sh"
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
musllinux-aarch64-image = "musllinux_1_1"
musllinux-i686-image = "musllinux_1_1"
musllinux-x86_64-image = "musllinux_1_1"
[tool.cibuildwheel.linux.environment]
ZMQ_PREFIX = "/usr/local"
CFLAGS = "-Wl,-strip-all"
CXXFLAGS = "-Wl,-strip-all"
[tool.cibuildwheel.macos]
before-all = "bash tools/install_libzmq.sh"
[tool.cibuildwheel.macos.environment]
ZMQ_PREFIX = "/usr/local"
MACOSX_DEPLOYMENT_TARGET = "10.9"
[tool.cibuildwheel.windows]
before-all = [
"python setup.py fetch_libzmq --dll",
"xcopy /i libzmq-dll C:\\libzmq-dll",
]
repair-wheel-command = """
delvewheel repair \
-v \
--add-path=C:/libzmq-dll \
--wheel-dir={dest_dir} \
{wheel}
"""
[tool.cibuildwheel.windows.environment]
ZMQ_PREFIX = "libzmq-dll"
# mac-arm target is 10.15
[[tool.cibuildwheel.overrides]]
select = "*macos*{universal2,arm64}*"
environment = { MACOSX_DEPLOYMENT_TARGET = "10.15" }
# manylinux1 for old Python
[[tool.cibuildwheel.overrides]]
select = "cp3{6,7}-*"
manylinux-x86_64-image = "manylinux1"
manylinux-i686-image = "manylinux1"
# manylinux2010 for (less) old cp38-9, pp37-8
[[tool.cibuildwheel.overrides]]
select = "cp3{8,9}-* pp3{7,8}-*"
manylinux-x86_64-image = "manylinux2010"
manylinux-i686-image = "manylinux2010"
# note: manylinux_2_28 builds are added
# in .github/workflows/wheels.yml
[[tool.cibuildwheel.overrides]]
select = "pp*win*"
# pypy builds libzmq as an Extension,
# doesn't bundle dlls (requires separate vcredist install, as pypy itself seems to)
# bundling external libzmq doesn't seem to work
environment = { ZMQ_PREFIX = "" }
repair-wheel-command = ""