-
Notifications
You must be signed in to change notification settings - Fork 664
Expand file tree
/
Copy pathpyproject.toml
More file actions
215 lines (183 loc) · 5.76 KB
/
pyproject.toml
File metadata and controls
215 lines (183 loc) · 5.76 KB
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
211
212
213
214
215
# PEP 621 build info
[build-system]
requires = [
"cffi; implementation_name == 'pypy'",
"cython>=3.0.0; implementation_name != 'pypy'",
"packaging",
"scikit-build-core>=0.10",
]
build-backend = "scikit_build_core.build"
# Project metadata
# ref: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[project]
name = "pyzmq"
version = "27.2.0.dev"
authors = [
{ name = "PyZMQ Contributors", email = "zeromq-dev@lists.zeromq.org" },
{ name = "Brian E. Granger" },
{ name = "Min Ragan-Kelley" },
]
license = "BSD-3-Clause"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Topic :: System :: Networking",
"Programming Language :: Python :: 3",
]
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 = ["LICENSE*", "licenses/LICENSE*"]
# 3.15 is required by scikit-build-core
cmake.version = ">=3.15"
# only build/install the pyzmq component
build.targets = ["pyzmq"]
install.components = ["pyzmq"]
[[tool.scikit-build.overrides]]
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]
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 = "27.2.0.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"
enable = ["cpython-freethreading", "pypy", "pypy-eol"]
test-requires = ["pytest>=6", "importlib_metadata"]
test-sources = ["tools/test_wheel.py"]
test-command = "python -m pytest -vsx tools/test_wheel.py"
build-frontend = "build"
[tool.cibuildwheel.environment]
NO_CYTHON_COMPILE = "true"
[tool.cibuildwheel.linux]
before-all = "bash tools/install_libzmq.sh"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
musllinux-aarch64-image = "musllinux_1_2"
musllinux-i686-image = "musllinux_1_2"
musllinux-x86_64-image = "musllinux_1_2"
[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]
ZMQ_PREFIX = "/tmp/zmq"
MACOSX_DEPLOYMENT_TARGET = "10.15"
[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"
[tool.cibuildwheel.android.environment]
# 24 needed for c++
ANDROID_API_LEVEL = "24"
# manylinux2014 for old Python <= 3.9
[[tool.cibuildwheel.overrides]]
select = "cp3{8,9}-* pp3{8,9}-*"
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
# 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}"