-
Notifications
You must be signed in to change notification settings - Fork 492
Expand file tree
/
Copy pathpyproject.toml
More file actions
72 lines (65 loc) · 2.54 KB
/
pyproject.toml
File metadata and controls
72 lines (65 loc) · 2.54 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
[build-system]
requires = [
"setuptools>=42",
"wheel",
"cmake>=3.14",
"ninja; sys_platform != 'win32' and platform_machine != 'arm64'",
# Documentation requirements (see docs/requirements.txt for details)
"urllib3<2",
"docutils>=0.18.1",
"sphinx<=7.1.2",
"six",
"testresources",
"recommonmark",
"sphinx-press-theme",
"sphinx-tabs",
"breathe"
]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
build-verbosity = "1"
test-requires = ["numpy"]
test-command = [
"python {project}/tests/python/OpenColorIOTestSuite.py",
"ociocheck"
]
[tool.cibuildwheel.linux]
before-build = "share/ci/scripts/linux/yum/install_docs_env.sh"
[tool.cibuildwheel.macos]
# cibuildwheel in some cases set this to 10.9 by default, OCIO needs >= 10.13
# macOS ARM wheels needs 11.0, cibuildwheel will automatically bump where appropriate
environment = { MACOSX_DEPLOYMENT_TARGET="10.13" }
before-build = "share/ci/scripts/macos/install_docs_env.sh"
[tool.cibuildwheel.windows]
# OCIO_PYTHON_LOAD_DLLS_FROM_PATH can cause segfaults in the current wheel workflow
# Disable for now as wheels are built with static dependencies.
environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH", OCIO_PYTHON_LOAD_DLLS_FROM_PATH="0" }
before-build = 'bash -c "share/ci/scripts/windows/install_docs_env.sh $GITHUB_WORKSPACE/doxygen"'
[[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:
# - `cmake /path/to/source; cmake --build . --target 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.2.0"
# Note: the python version here must be kept in sync with src/bindings/python/CMakeLists.txt
select = "cp311-manylinux_*64"
inherit.test-command = "append"
test-command = [
"python {project}/src/bindings/python/stubs/generate_stubs.py --out-path '/output' --validate-path '{project}/src/bindings/python/stubs/PyOpenColorIO/__init__.pyi'",
]
[tool.mypy]
files = [
"tests/python/",
"src/bindings/python/stubs",
]
allow_redefinition = true
check_untyped_defs = true
disable_error_code = [
"func-returns-value",
]