-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
176 lines (154 loc) · 4.8 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
[build-system]
requires = ["scikit-build-core>=0.3.3", "pybind11>=2.12", "hatchling"]
build-backend = "scikit_build_core.build"
[project]
name = "blurhash-pyside"
description = "Encode or Decode Blurhash strings in a PySide2/6 project."
readme = "README.md"
license-files = { paths = ["LICENSE"] }
authors = [
{ name = "Leo Covarrubias", email = "[email protected]" },
]
keywords = ["pyside2", "pyside6", "burhash"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.9.1"
dynamic = ["version"]
[project.optional-dependencies]
test = [
"pytest",
"opencv-python",
"scikit-image",
"numpy", # testing under PySide2 requires numpy<2
]
[project.urls]
Documentation = "https://github.com/leocov-dev/blurhash-pyside#readme"
Issues = "https://github.com/leocov-dev/blurhash-pyside/issues"
Source = "https://github.com/leocov-dev/blurhash-pyside"
Releases = "https://github.com/leocov-dev/blurhash-pyside/releases"
# ------------------------------------------------------------------------------
# dynamic version --------------------------------------------------------------
[tool.hatch.version]
path = "src/blurhash_pyside/__init__.py"
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "src/blurhash_pyside/__init__.py"
# ------------------------------------------------------------------------------
# default ----------------------------------------------------------------------
[tool.hatch.envs.default]
type = "virtual"
path = ".venv"
dependencies = [
"build",
"pybind11>=2.12",
]
features = ["test"]
[tool.hatch.envs.default.scripts]
compile = "python scripts/compile-cpp.py"
# ------------------------------------------------------------------------------
# examples env -----------------------------------------------------------------
[tool.hatch.envs.pyside6]
skip-install = false
dependencies = [
"PySide6",
"qtpy~=2.4",
"pybind11>=2.12",
]
[tool.hatch.envs.pyside6.scripts]
example = [
"hatch run compile",
"python examples/pyside6-example.py",
]
[tool.hatch.envs.pyside2]
python = "3.9"
dependencies = [
"PySide2",
"qtpy~=2.4",
"pybind11>=2.12",
]
[tool.hatch.envs.pyside2.scripts]
example = [
"hatch run compile",
"python examples/pyside2-example.py",
]
# ------------------------------------------------------------------------------
# hatch-test -------------------------------------------------------------------
[tool.hatch.envs.hatch-test]
dev-mode = true
extra-dependencies = ["PySide6"]
features = ["test"]
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.12", "3.11", "3.10", "3.9"]
# ------------------------------------------------------------------------------
# pytest -----------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
# ------------------------------------------------------------------------------
# ruff -------------------------------------------------------------------------
[tool.ruff.lint]
extend-ignore = [
"PLR2004",
"TRY003",
"EM101",
"EM102",
]
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = [
"TID252",
]
"_wrapper.py" = [
"TID252",
]
"tests/*" = [
"INP001",
"ARG001",
]
"examples/*" = [
"INP001",
"N802",
"E722",
"S110",
]
"scripts/*" = [
"S607",
]
# ------------------------------------------------------------------------------
# scikit -----------------------# ----------------------------------------------
[tool.hatch.build.targets.wheel.hooks.scikit-build]
experimental = true
[tool.scikit-build]
cmake.version = ">=3.27"
cmake.build-type = "Release"
wheel.cmake = true
wheel.license-files = ["LICENSE"]
sdist.reproducible = true
sdist.cmake = true
# ------------------------------------------------------------------------------
# cibuildwheel -----------------------------------------------------------------
[tool.cibuildwheel]
build-frontend = "build"
before-build = "rm -rf {packakge}/build"
build = "cp39-* cp310-* cp311-* cp312-*"
# skip platforms
# pp* - don't build any PyPy variations
# win32* - don't build 32bit windows variations
# *_i686 - don't build 32bit linux variations
# *musllinux* - don't build musl linux variations
skip = "pp* *-win32 *_i686 *musllinux*"
test-requires = "pyside6"
test-extras = "test"
test-command = "pytest {project}/tests"
[tool.cibuildwheel.windows]
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "11" }
[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_31"
before-all = "yum install -y libxkbcommon"