|
| 1 | +# SPDX-License-Identifier: BSD-3-Clause |
| 2 | +# Copyright (c) Contributors to the OpenEXR Project. |
| 3 | + |
| 4 | +[build-system] |
| 5 | +requires = ["scikit-build-core==0.8.1", "pybind11"] |
| 6 | +build-backend = "scikit_build_core.build" |
| 7 | + |
| 8 | +[project] |
| 9 | +name = "Imath" |
| 10 | +dynamic = ["version"] |
| 11 | + |
| 12 | +description="Python bindings for the Imath a basic, light-weight, and efficient C++ representation of 2D and 3D vectors and matrices and other simple but useful mathematical objects, functions, and data types common in computer graphics applications, including the “half” 16-bit floating-point type." |
| 13 | +readme = "README.md" |
| 14 | +authors = [ |
| 15 | + { name= "Contributors to the OpenEXR project", email= "[email protected]" }, |
| 16 | +] |
| 17 | +requires-python = ">=3.7" |
| 18 | + |
| 19 | +[project.urls] |
| 20 | +"Homepage" = "https://imath.readthedocs.io/" |
| 21 | +"Source" = "https://github.com/AcademySoftwareFoundation/Imath" |
| 22 | +"Bug Tracker" = "https://github.com/AcademySoftwareFoundation/Imath/issues" |
| 23 | + |
| 24 | +[project.optional-dependencies] |
| 25 | +test = ["pytest"] |
| 26 | + |
| 27 | +[tool.pytest.ini_options] |
| 28 | +minversion = "6.0" |
| 29 | +addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] |
| 30 | +xfail_strict = true |
| 31 | +log_cli_level = "INFO" |
| 32 | +filterwarnings = [ |
| 33 | + "error", |
| 34 | +] |
| 35 | +testpaths = ["tests"] |
| 36 | + |
| 37 | +[tool.scikit-build] |
| 38 | +wheel.expand-macos-universal-tags = true |
| 39 | +sdist.exclude = [".github", "src/**Test", "website", "share"] |
| 40 | + |
| 41 | +# Only build the PyOpenEXR (cmake --build --target PyOpenEXR). |
| 42 | +cmake.targets = ["Imath"] |
| 43 | +# Only install the "python" component (cmake --install --component python). |
| 44 | +# This makes sure that only files marked as "python" component are installed. |
| 45 | +install.components = ["python"] |
| 46 | +# strip debug symbols |
| 47 | +install.strip = true |
| 48 | + |
| 49 | +# Enable experimental features if any are available |
| 50 | +# In this case we need custom local plugin to get |
| 51 | +# the project version from cmake. |
| 52 | +experimental = true |
| 53 | +metadata.version.provider = "IMATH_skbuild_plugin" |
| 54 | +metadata.version.provider-path = "./src/python" |
| 55 | + |
| 56 | + |
| 57 | +[tool.scikit-build.cmake.define] |
| 58 | +IMATH_INSTALL = 'OFF' |
| 59 | +IMATH_BUILD_PYTHON = 'ON' |
| 60 | +IMATH_BUILD_EXAMPLES = 'OFF' |
| 61 | +IMATH_BUILD_TOOLS = 'OFF' |
| 62 | +IMATH_INSTALL_TOOLS = 'OFF' |
| 63 | +IMATH_INSTALL_PKG_CONFIG = 'OFF' |
| 64 | +IMATH_FORCE_INTERNAL_DEFLATE = 'ON' |
| 65 | +IMATH_FORCE_INTERNAL_IMATH = 'ON' |
| 66 | +IMATH_TEST_LIBRARIES = 'OFF' |
| 67 | +BUILD_SHARED_LIBS = 'OFF' |
| 68 | +CMAKE_OSX_DEPLOYMENT_TARGET = '10.15' |
| 69 | +CMAKE_POSITION_INDEPENDENT_CODE = 'ON' |
| 70 | + |
| 71 | +[tool.cibuildwheel] |
| 72 | +test-command = "pytest -s {project}/src/python/tests" |
| 73 | +test-requires = ["numpy"] |
| 74 | +test-extras = ["test"] |
| 75 | +test-skip = ["*universal2:arm64"] |
| 76 | +build-verbosity = 1 |
| 77 | + |
| 78 | +manylinux-x86_64-image = "manylinux2014" |
| 79 | +manylinux-i686-image = "manylinux2014" |
| 80 | +manylinux-aarch64-image = "manylinux2014" |
| 81 | + |
| 82 | +# Needed for full C++17 support |
| 83 | +[tool.cibuildwheel.macos.environment] |
| 84 | +MACOSX_DEPLOYMENT_TARGET = "10.15" |
0 commit comments