Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (89 loc) · 3.17 KB
/
Copy pathpyproject.toml
File metadata and controls
115 lines (89 loc) · 3.17 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
[build-system]
requires = [
"scikit-build-core",
"nanobind==3.1.0",
"nanobind-backend>=1.0.0",
"typing_extensions",
"hatch-fancy-pypi-readme"
]
build-backend = "scikit_build_core.build"
[project]
name = "drjit"
dynamic = ["version", "readme"]
description = "Dr.Jit: A Just-In-Time Compiler for Differentiable Rendering"
dependencies = [
"typing_extensions;python_version<\"3.11\"",
"nanobind-backend>=1.0.0"
]
requires-python = ">=3.10"
authors = [
{ name = "Wenzel Jakob", email = "wenzel.jakob@epfl.ch" },
{ name = "Christian Döring", email = "christian.doering@tum.de" },
{ name = "Nicolas Roussel", email = "nicolas.roussel@epfl.ch" },
{ name = "Sébastien Speierer", email = "sebastien.speierer@epfl.ch" },
{ name = "Delio Vicini", email = "delio.vicini@epfl.ch" }
]
classifiers = [
"License :: OSI Approved :: BSD License"
]
[project.urls]
Homepage = "https://github.com/mitsuba-renderer/drjit"
[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "0.4"
# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}"
# Tool to generate README for PyPI
metadata.readme.provider = "scikit_build_core.metadata.fancy_pypi_readme"
cmake.verbose = true
logging.level = "INFO"
# Split mode targets the Python 3.10 stable ABI, so one wheel per platform
# covers every supported Python version
wheel.py-api = "cp310"
[tool.cibuildwheel]
# Necessary to see build output from the actual compilation
build-verbosity = 1
# One Python version per platform suffices (see 'wheel.py-api' above)
build = "cp310-*"
archs = ["auto64"]
# The 'nanobind-backend' package needs a shared C++ runtime, which rules out
# musl. Its wheels furthermore target manylinux_2_28.
skip = "*-musllinux* pp*"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
# Try to import the package to see if it was built correctly (compromise)
test-command = "python -c \"import drjit\""
# Needed for full C++17 support
[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "11.0"
[tool.cibuildwheel.linux]
before-all = "dnf install -y libatomic"
[tool.pytest.ini_options]
norecursedirs = [ "ext" ]
[tool.scikit-build.metadata.version]
# Fetch version number from header file
provider = "scikit_build_core.metadata.regex"
input = "include/drjit/fwd.h"
regex = '''(?sx)
\#define \s+ DRJIT_VERSION_MAJOR \s+ (?P<major>\d+) .*?
\#define \s+ DRJIT_VERSION_MINOR \s+ (?P<minor>\d+) .*?
\#define \s+ DRJIT_VERSION_PATCH \s+ (?P<patch>\d+ (?: \.[a-zA-Z]+\d* )? ) .*?
'''
result = "{major}.{minor}.{patch}"
# Build PyPI compliant README file from original README.rst
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
end-before = ".. image::"
pattern = "(.*)"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = '''
.. image:: https://github.com/mitsuba-renderer/drjit-core/raw/master/resources/drjit-logo-dark.svg
:alt: Dr.Jit logo
:align: center
'''
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
start-after = "</p>\n\n"
pattern = "(.*)"