-
Notifications
You must be signed in to change notification settings - Fork 459
Expand file tree
/
Copy pathpyproject.toml
More file actions
273 lines (244 loc) · 7.71 KB
/
Copy pathpyproject.toml
File metadata and controls
273 lines (244 loc) · 7.71 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
[project]
name = "memray"
description = "A memory profiler for Python applications"
readme = "README.md"
requires-python = ">=3.9.0"
license = { text = "Apache 2.0" }
authors = [{ name = "Pablo Galindo Salgado" }, { name = "Matt Wozniski" }]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"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",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Debuggers",
]
dependencies = [
"jinja2 >= 2.9",
"rich >= 11.2.0",
"textual >= 0.41.0",
]
dynamic = ["version"]
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "src/memray/_version.py"
[project.optional-dependencies]
test = [
"Cython",
"greenlet; python_version < '3.15'",
"pytest",
"pytest-cov",
"ipython",
"scikit-build-core",
"setuptools",
"pytest-textual-snapshot",
"textual >= 0.43, != 0.65.2, != 0.66",
"packaging",
]
docs = [
"IPython",
"bump2version",
"sphinx",
"furo",
"sphinx-argparse",
"towncrier",
]
lint = ["black", "flake8", "isort", "mypy", "check-manifest"]
benchmark = ["asv"]
dev = [
"Cython",
"greenlet; python_version < '3.15'",
"pytest",
"pytest-cov",
"ipython",
"scikit-build-core",
"setuptools",
"pytest-textual-snapshot",
"textual >= 0.43, != 0.65.2, != 0.66",
"packaging",
"black",
"flake8",
"isort",
"mypy",
"check-manifest",
"IPython",
"bump2version",
"sphinx",
"furo",
"sphinx-argparse",
"towncrier",
"asv",
]
[project.urls]
Homepage = "https://github.com/bloomberg/memray"
[project.scripts]
memray = "memray.__main__:main"
[build-system]
requires = ["scikit-build-core>=0.9", "cython>=3.1"]
build-backend = "scikit_build_core.build"
[tool.scikit-build]
minimum-version = "0.9"
cmake.verbose = true
cmake.version = ">=3.30"
cmake.build-type = "RelWithDebInfo"
logging.level = "INFO"
install.strip = false
sdist.exclude = [
"/*/",
"!/src/",
".*",
"/src/vendor/libbacktrace/install/**",
"/src/memray/*.cpp",
"/src/memray/*.h",
"/src/memray/**/*.md",
"/.clang-format",
"/asv.conf.json",
"/CONTRIBUTING.md",
"/Dockerfile",
"/Jenkinsfile",
"/requirements-*.txt",
"/.medusarc",
"/valgrind.supp",
]
wheel.packages = ["src/memray"]
wheel.exclude = ["memray/_memray/**"]
[dependency-groups]
test=['Cython', 'coverage[toml]', "greenlet; python_version < '3.15'", 'pytest', 'pytest-cov', 'ipython', 'scikit-build-core', 'setuptools', 'pkgconfig', 'pytest-textual-snapshot', 'textual >= 0.43, != 0.65.2, != 0.66', 'packaging']
docs=['IPython', 'sphinx','sphinx-autobuild', 'sphinx-argparse', 'furo']
extra=['mypy', 'bump2version','towncrier', 'prek', {include-group = "docs"}]
[[tool.scikit-build.overrides]]
if.state = "editable"
build-dir = "build"
editable.verbose = false
cmake.build-type = "Debug"
[tool.ruff]
line-length = 95
select = ["C4", "E", "F", "I001", "PERF", "W"]
fix = true
[tool.ruff.isort]
force-single-line = true
known-first-party = ["memray"]
known-third-party = ["rich", "elftools", "pytest"]
[tool.ruff.per-file-ignores]
"benchmarks/*" = ["C4", "PERF"]
[tool.isort]
force_single_line = true
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
known_first_party = ["memray"]
known_third_party = ["rich", "elftools", "pytest"]
[tool.towncrier]
package = "memray"
package_dir = "src"
filename = "NEWS.rst"
directory = "news"
type = [
{ name = "Features", directory = "feature", showcontent = true },
{ name = "Deprecations and Removals", directory = "removal", showcontent = true },
{ name = "Bug Fixes", directory = "bugfix", showcontent = true },
{ name = "Improved Documentation", directory = "doc", showcontent = true },
{ name = "Miscellaneous", directory = "misc", showcontent = true },
]
underlines = "-~"
[tool.pytest.ini_options]
markers = ["valgrind"]
xfail_strict = true
testpaths = ["tests"]
[tool.check-manifest]
ignore = ["src/memray/reporters/templates/assets/*.js"]
[tool.mypy]
exclude = "tests/integration/(native_extension|multithreaded_extension)/"
[tool.cibuildwheel]
build = ["cp3{9..15}{t,}-*"]
enable = ["cpython-prerelease"]
skip = "*musllinux*{i686,aarch64}*"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux2014"
musllinux-x86_64-image = "musllinux_1_2"
[tool.cibuildwheel.linux]
before-all = [
# Build the latest curl from source.
"yum install -y openssl-devel",
"cd /",
"CURL_VERS=8.7.1",
"curl -LO https://curl.se/download/curl-$CURL_VERS.tar.bz2",
"tar xf ./curl-$CURL_VERS.tar.bz2",
"cd curl-$CURL_VERS",
"./configure --with-openssl",
"make install",
# Build the latest zstd from source
"yum install -y lz4-devel xz-devel",
"cd /",
"ZSTD_VERS=1.5.6",
"/usr/bin/curl -LO https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-$ZSTD_VERS.tar.gz",
"tar xf ./zstd-$ZSTD_VERS.tar.gz",
"cd zstd-$ZSTD_VERS",
"V=1 LDLIBS=-lrt make install",
# Build the latest elfutils from source.
"yum install -y lz4-devel",
"cd /",
"VERS=0.191",
"/usr/bin/curl -L https://mirrors.kernel.org/sourceware/elfutils/$VERS/elfutils-$VERS.tar.bz2 >./elfutils.tar.bz2",
"tar -xf elfutils.tar.bz2",
"cd elfutils-$VERS",
"CFLAGS='-Wno-error -g -O3' CXXFLAGS='-Wno-error -g -O3' LDFLAGS=-lrt ./configure --enable-libdebuginfod --disable-debuginfod --disable-nls --with-zstd",
"make install",
# Install Memray's other build and test dependencies
"yum install -y libunwind-devel",
]
[tool.cibuildwheel.macos]
before-all = [
"git clone --depth 1 --branch v1.9.4 https://github.com/lz4/lz4 lz4",
"cd lz4",
"make",
"make install PREFIX=$LZ4_INSTALL_DIR",
"find $LZ4_INSTALL_DIR",
]
before-test = [
"codesign --remove-signature /Library/Frameworks/Python.framework/Versions/*/bin/python3 || true",
"codesign --remove-signature /Library/Frameworks/Python.framework/Versions/*/Resources/Python.app/Contents/MacOS/Python || true",
]
[tool.coverage.run]
plugins = ["Cython.Coverage"]
source = ["src/memray", "tests/"]
branch = true
parallel = true
omit = ["*__init__.py"]
[tool.coverage.report]
skip_covered = true
show_missing = true
# Override the default linux before-all for musl linux
[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
before-all = [
# Remove gettext-dev, which conficts with the musl-libintl, which is a build
# dependency of elfutils.
"apk del gettext-dev glib-dev",
# Build the latest elfutils from source. The build steps come from
# https://git.alpinelinux.org/aports/tree/main/elfutils, and the need to
# set the FNM_EXTMATCH macro to get the build to succeed is seen here:
# https://git.alpinelinux.org/aports/tree/main/elfutils/musl-macros.patch
"cd /",
"apk add --update argp-standalone bison bsd-compat-headers bzip2-dev curl-dev flex-dev libtool linux-headers musl-fts-dev musl-libintl musl-obstack-dev xz-dev zlib-dev zstd-dev",
"VERS=0.191",
"curl -L https://mirrors.kernel.org/sourceware/elfutils/$VERS/elfutils-$VERS.tar.bz2 >./elfutils.tar.bz2",
"tar -xf elfutils.tar.bz2",
"cd elfutils-$VERS",
"CFLAGS='-Wno-error -DFNM_EXTMATCH=0 -g -O3' CXXFLAGS='-Wno-error -g -O3' ./configure --enable-libdebuginfod --disable-debuginfod --disable-nls --with-zstd",
"make install",
# Reinstall libintl, as the Python interpreter requires it
"apk del musl-libintl",
"apk add libintl",
# Install Memray's other build and test dependencies
"apk add --update libunwind-dev lz4-dev"
]