/
pyproject.toml
123 lines (109 loc) · 3.05 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
[project]
requires-python = ">=3.7"
[build-system]
requires = [
"setuptools >= 52",
"wheel >= 0.35",
"setuptools_scm[toml] >= 6.4",
"setuptools_scm_git_archive",
"pybind11 >= 2.9.1, < 2.10.0"
]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 88
target-version = ["py37", "py38"]
skip-string-normalization = true
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| docs
| misc
| \.egg-info
)/
'''
[tool.cibuildwheel]
test-command = "pytest -nauto {project}/tests"
test-extras = "test"
skip = "cp36-*"
test-skip = "*_arm64 *_universal2:arm64"
[tool.cibuildwheel.environment]
QPDF_MIN_VERSION = "10.6.2"
QPDF_VERSION = "10.6.2"
QPDF_PATTERN = "https://github.com/qpdf/qpdf/releases/download/release-qpdf-VERSION/qpdf-VERSION.tar.gz"
JPEG_RELEASE = "https://www.ijg.org/files/jpegsrc.v9d.tar.gz"
ZLIB_RELEASE = "https://www.zlib.net/zlib-1.2.11.tar.gz"
[tool.cibuildwheel.linux]
before-all = [
"yum install -y wget libxml2-devel libxslt-devel",
"bash build-scripts/linux-install-libxmp.bash",
"bash build-scripts/linux-download-qpdf-deps.bash",
"bash build-scripts/linux-download-qpdf.bash $QPDF_VERSION",
"bash build-scripts/linux-build-wheel-deps.bash"
]
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux2014"
manylinux-pypy_i686-image = "manylinux2014"
skip = "*-musllinux_* pp38*"
[[tool.cibuildwheel.overrides]]
# As of 2021-10, musllinux image was based on Alpine 3.12
# We need Alpine 3.14 or newer to get the required package versions
# Check https://github.com/pypa/manylinux/blob/main/build.sh#L66 to see if
# musllinux has been updated.
select = "*-musllinux*"
before-all = [
"apk add py3-lxml py3-pillow python3 py3-setuptools py3-pybind11-dev python3-dev py3-wheel qpdf-dev exempi-dev"
]
[tool.cibuildwheel.macos]
before-all = ["brew update", "brew install qpdf little-cms2"]
[tool.cibuildwheel.windows]
# pp3*-win32 fails because there is no wheel for lxml
# pp3*-win_amd64 does not execute because cibuildwheel does not implement it
# or PyPy3 doesn't work on Windows 64-bit, one or the other
# PyPy+Win32 seems like a very low priority combination
skip = "pp3*"
[tool.mypy]
[tool.pytest.ini_options]
minversion = "6.0"
norecursedirs = ["lib", ".pc", ".git", "venv"]
testpaths = ["tests"]
addopts = "-n auto"
[tool.coverage.run]
concurrency = ["multiprocessing"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
]
[tool.coverage.html]
directory = "coverage/pycov"
[tool.isort]
profile = "black"
known_first_party = ["pikepdf"]
known_third_party = [
"PIL",
"conftest",
"hypothesis",
"lxml",
"pkg_resources",
"psutil",
"pytest",
"setuptools"
]