-
Notifications
You must be signed in to change notification settings - Fork 662
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (151 loc) · 5.95 KB
/
pyproject.toml
File metadata and controls
167 lines (151 loc) · 5.95 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
# See docs at https://cibuildwheel.pypa.io/en/stable/options
# for description of all the options in this file.
[project]
name = "OpenImageIO"
# The build backend ascertains the version from the CMakeLists.txt file.
dynamic = ["version"]
description = "Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications."
authors = [
{name = "Larry Gritz", email = "lg@larrygritz.com"},
{name = "OpenImageIO Contributors", email = "oiio-dev@lists.aswf.io"}
]
maintainers = [
{name = "OpenImageIO Contributors", email="oiio-dev@lists.aswf.io"},
]
readme = "README.md"
license = {text = "Apache-2.0"}
classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"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",
"License :: OSI Approved :: Apache Software License",
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Video",
"Topic :: Multimedia :: Video :: Display",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">= 3.9"
dependencies = [
"numpy>=2.0,<3",
]
[project.urls]
Homepage = "https://openimageio.org/"
Source = "https://github.com/AcademySoftwareFoundation/OpenImageIO"
Documentation = "https://docs.openimageio.org"
Issues = "https://github.com/AcademySoftwareFoundation/OpenImageIO/issues"
[project.scripts]
# Use the convention below to expose CLI tools as Python scripts.
idiff = "OpenImageIO:_command_line"
maketx = "OpenImageIO:_command_line"
oiiotool = "OpenImageIO:_command_line"
[build-system]
build-backend = "scikit_build_core.build"
requires = [
"scikit-build-core>=0.10.6,<1",
"pybind11>=2.13,<4",
]
[tool.scikit-build]
build.verbose = true
# Exclude unnecessary directories from the source distribution.
sdist.exclude = [".github", "testsuite", "ASWF", "docs"]
# Pin minimum scikit-build-core to that specified in build-system.requires.
minimum-version = "build-system.requires"
# Pin minimum CMake version to that specified in CMakeLists.txt.
cmake.version = "CMakeLists.txt"
wheel.license-files = ["LICENSE.md", "THIRD-PARTY.md"]
# Make sure the package is structured as expected.
wheel.install-dir = "OpenImageIO"
# Only install the user and fonts components.
install.components = ["user", "fonts"]
[tool.scikit-build.cmake.define]
# Build missing dependencies. See src/cmake for details.
OpenImageIO_BUILD_MISSING_DEPS = "all"
# Don't build tests. Dramatically improves build time.
OIIO_BUILD_TESTS = "0"
# Prefer linking static dependencies when possible.
LINKSTATIC = "1"
# Standardize the install directory for libraries, as expected by
# other parts of the wheels build process.
CMAKE_INSTALL_LIBDIR = "lib"
# Dynamically set the package version metadata by pasrsing CMakeLists.txt.
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "CMakeLists.txt"
regex = 'set \(OpenImageIO_VERSION "(?P<value>[0-9a-z.]+)"\)'
# On macOS, ensure dependencies are only built for the target architecture.
[[tool.scikit-build.overrides]]
if.platform-system = "darwin"
if.platform-machine = "arm64"
inherit.cmake.define = "append"
cmake.define.CMAKE_OSX_ARCHITECTURES = "arm64"
cmake.define.CMAKE_OSX_DEPLOYMENT_TARGET = "11"
[[tool.scikit-build.overrides]]
if.platform-system = "darwin"
if.platform-machine = "x86_64"
inherit.cmake.define = "append"
cmake.define.CMAKE_OSX_ARCHITECTURES = "x86_64"
cmake.define.CMAKE_OSX_DEPLOYMENT_TARGET = "10.15"
[tool.cibuildwheel]
build-verbosity = 1
skip = [
# Skip 32-bit builds
"*-win32",
"*-manylinux_i686",
# Building with musl seems to work, but the repair-wheel step seems to fail...
# This may be a bug in repairwheel (or auditwheel)?
"*musllinux*",
# Skip free-threading builds
"cp3??t-*",
]
test-command = "oiiotool --buildinfo"
[tool.cibuildwheel.macos.environment]
CC = "/usr/bin/clang"
CXX = "/usr/bin/clang++"
SKBUILD_CMAKE_ARGS = "-DLINKSTATIC=1; -DIGNORE_HOMEBREWED_DEPS=1"
# Optimize for size (not speed).
SKBUILD_CMAKE_BUILD_TYPE = "MinSizeRel"
[tool.cibuildwheel.linux.environment]
SKBUILD_CMAKE_ARGS = "-DLINKSTATIC=1"
# Suppress warnings that cause linux cibuildwheel build to fail
CXXFLAGS = "-Wno-error=stringop-overflow -Wno-pragmas"
SKBUILD_CMAKE_BUILD_TYPE = "MinSizeRel"
# FIXME: Getting build problems when using WebP 1.6.0, so hold it back
WebP_BUILD_VERSION = "1.5.0"
[tool.cibuildwheel.windows.environment]
SKBUILD_CMAKE_BUILD_TYPE = "MinSizeRel"
# Temporarily disabled test below. The CI stub generation seems broken, and
# is failing CI every time. Just turn off this check until we can figure out
# why it is broken.
# ----
# [[tool.cibuildwheel.overrides]]
# # Trigger the build & validation of the python stubs for certain platforms.
# # The test command acts as a kind of "post-build" callback where it's possible
# # for the stub-generator to import the freshly-built wheel.
# # There are two entry-points which are designed to call generate_stubs.py through
# # this test command:
# # - `make pystubs` is called during local development to generate the
# # stubs and copy them into the git repo to be committed and reviewed.
# # - in CI, the cibuildwheel action is used to validate that the stubs match what
# # has been committed to the repo.
# test-requires = "mypy~=1.15.0 stubgenlib~=0.1.0"
# # Note: the python version here must be kept in sync with src/python/stubs/CMakeLists.txt
# select = "cp311-manylinux_*64"
# inherit.test-command = "append"
# test-command = [
# "python {project}/src/python/stubs/generate_stubs.py --out-path '/output' --validate-path '{project}/src/python/stubs/OpenImageIO/__init__.pyi'",
# ]
# ----
[tool.mypy]
files = [
"testsuite/python-*/src/",
]
mypy_path = [
"src/python/stubs",
]
check_untyped_defs = true