-
Notifications
You must be signed in to change notification settings - Fork 394
/
pyproject.toml
180 lines (156 loc) · 5.4 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
[build-system]
requires = [
"setuptools",
"wheel",
"pkgconfig",
"Cython>=0.29.31"
]
build-backend = 'setuptools.build_meta'
[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
[tool.check-manifest]
ignore = [
"src/memray/reporters/templates/assets/*.js",
]
[tool.mypy]
exclude="tests/integration/(native_extension|multithreaded_extension)/"
[tool.cibuildwheel]
build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*"]
skip = "*musllinux*{i686,aarch64}*"
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
musllinux-x86_64-image = "musllinux_1_1"
[[tool.cibuildwheel.overrides]]
select = "cp3{7,8,9,10}-*"
manylinux-x86_64-image = "manylinux2010"
manylinux-i686-image = "manylinux2010"
[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 https://sourceware.org/elfutils/ftp/$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 musl-fts from source. This is a build dependency of elfutils, but
# isn't in the Alpine repos of the musllinux_1_1 image. The build steps come
# from https://git.alpinelinux.org/aports/tree/main/musl-fts/APKBUILD
# Setting PATH before calling boostrap.sh fixes an automake failure. I think
# the failure may be caused by a different pkg-config in /usr/local/bin.
"cd /",
"apk add --update automake autoconf libtool",
"VERS=1.2.7",
"curl -L https://github.com/void-linux/musl-fts/archive/refs/tags/v$VERS.tar.gz > ./musl-fts.tar.gz",
"tar -xf musl-fts.tar.gz",
"cd musl-fts-$VERS",
"PATH=/usr/bin:/bin ./bootstrap.sh",
"CFLAGS=-fPIC ./configure",
"make install",
# 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-libintl musl-obstack-dev xz-dev zlib-dev zstd-dev",
"VERS=0.191",
"curl https://sourceware.org/elfutils/ftp/$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",
# Install Memray's other build and test dependencies
"apk add --update libunwind-dev lz4-dev"
]