-
Notifications
You must be signed in to change notification settings - Fork 636
/
pyproject.toml
210 lines (181 loc) · 5.86 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# PEP 621 build info
[build-system]
requires = [
"cffi; implementation_name == 'pypy'",
"cython>=3.0.0; implementation_name != 'pypy'",
"packaging",
"scikit-build-core",
]
build-backend = "scikit_build_core.build"
# Project metadata
# ref: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[project]
name = "pyzmq"
version = "26.2.1.dev"
authors = [
{ name = "PyZMQ Contributors", email = "[email protected]" },
{ name = "Brian E. Granger" },
{ name = "Min Ragan-Kelley" },
]
license = { file = "LICENSE.md" }
requires-python = ">=3.7"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Topic :: System :: Networking",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = ["cffi; implementation_name == 'pypy'"]
description = "Python bindings for 0MQ"
readme = "README.md"
[project.urls]
Homepage = "https://pyzmq.readthedocs.org"
Documentation = "https://pyzmq.readthedocs.org"
Source = "https://github.com/zeromq/pyzmq"
Tracker = "https://github.com/zeromq/pyzmq/issues"
[tool.scikit-build]
wheel.packages = ["zmq"]
wheel.license-files = ["licenses/LICENSE*"]
# 3.15 is required by scikit-build-core
cmake.version = ">=3.15"
# only build/install the pyzmq component
cmake.targets = ["pyzmq"]
install.components = ["pyzmq"]
[tool.ruff]
[tool.ruff.format]
exclude = [
"buildutils/templates/*",
"zmq/eventloop/minitornado/*",
]
quote-style = "preserve"
[tool.ruff.lint.isort]
known-first-party = ["zmq", "zmq_test_utils"]
[tool.ruff.lint]
select = [
"E",
"F",
"UP",
"I",
]
ignore = [
"E501", # line length (formatter is responsible)
"E721", # compare types
"F841", # unused variables
]
exclude = ["buildutils/templates/*"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F4", "E4"]
"__init__.pyi" = ["F4", "E4"]
"tests/*" = ["E4", "F4"]
"docs/source/conf.py" = ["E4"]
"zmq/eventloop/*" = ["E402"]
"zmq/ssh/forward.py" = ["E"]
# no longer used autoformatters, linters:
[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"]
[tool.tbump]
# Uncomment this if your project is hosted on GitHub:
github_url = "https://github.com/zeromq/pyzmq"
[tool.tbump.version]
current = "26.2.1.dev"
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 = "pyproject.toml"
search = 'version = "{current_version}"'
[[tool.tbump.file]]
src = "zmq/sugar/version.py"
search = '__version__: str = "{current_version}"'
[tool.cibuildwheel]
build-verbosity = "1"
free-threaded-support = true
test-requires = ["pytest>=6", "importlib_metadata"]
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"
repair-wheel-command = "delocate-wheel --sanitize-rpaths --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
[tool.cibuildwheel.macos.environment]
# note: everything here needs to also be duplicated in overrides below
ZMQ_PREFIX = "/tmp/zmq"
MACOSX_DEPLOYMENT_TARGET = "10.9"
[tool.cibuildwheel.windows]
before-all = "python buildutils/bundle.py licenses"
repair-wheel-command = """\
delvewheel repair \
-v \
--wheel-dir={dest_dir} \
{wheel} \
"""
[tool.cibuildwheel.windows.config-settings]
"cmake.define.ZMQ_PREFIX" = "bundled"
# statically link MSVCP
# see https://github.com/zeromq/pyzmq/issues/2012
# and https://github.com/matplotlib/matplotlib/pull/28687
"cmake.define.CMAKE_MSVC_RUNTIME_LIBRARY" = "MultiThreaded"
"cmake.define.CMAKE_SHARED_LINKER_FLAGS" = "ucrt.lib;vcruntime.lib;/nodefaultlib:libucrt.lib;/nodefaultlib:libvcruntime.lib"
# disable IPC/epoll on Windows
# due to https://github.com/zeromq/pyzmq/issues/1981
"cmake.define.ZMQ_HAVE_IPC" = "OFF"
"cmake.define.POLLER" = "select"
# mac-arm target is 10.15
[[tool.cibuildwheel.overrides]]
select = "*macos*{universal2,arm64}*"
environment = { ZMQ_PREFIX = "/tmp/zmq", MACOSX_DEPLOYMENT_TARGET = "10.15" }
# 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"
# 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"