Skip to content

Commit da5a372

Browse files
Switch python build to scikit-build-core
1 parent 3a8bad4 commit da5a372

File tree

9 files changed

+106
-475
lines changed

9 files changed

+106
-475
lines changed

.github/workflows/python-package.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111

1212
on:
1313
push:
14-
branches: [ main ]
14+
branches: [ main, "switch_to_scikit_build_core" ]
1515
pull_request:
1616
branches: [ main ]
1717

@@ -93,6 +93,7 @@ jobs:
9393
py_build_test:
9494
runs-on: ${{ matrix.os }}
9595
strategy:
96+
fail-fast: false
9697
matrix:
9798
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
9899
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
@@ -146,8 +147,8 @@ jobs:
146147
sudo apt-get install lcov
147148
- name: Install python build dependencies
148149
run: |
149-
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
150-
- name: Run check-manifest and lint check
150+
python -m pip install --upgrade pip build "flake8>=3.5"
151+
- name: Run lint check
151152
run: make ci-prebuild
152153
- name: Build and Install
153154
run: |

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ if(OTIO_PYTHON_INSTALL)
7272
# can find them, rather as part of the C++ SDK package; so the variable
7373
# OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR indicates where that is.
7474
#
75+
if (SKBUILD)
76+
set(OTIO_PYTHON_INSTALL_DIR ${SKBUILD_PLATLIB_DIR})
77+
endif()
78+
7579
if(OTIO_PYTHON_INSTALL_DIR STREQUAL "" AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
7680
# neither install directory supplied from the command line
7781
set(OTIO_RESOLVED_PYTHON_INSTALL_DIR "${Python_SITEARCH}")

MANIFEST.in

-31
This file was deleted.

Makefile

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.PHONY: coverage test test_first_fail clean autopep8 lint doc-html \
2-
python-version wheel manifest lcov lcov-html lcov-reset
2+
python-version wheel lcov lcov-html lcov-reset
33

44
# Special definition to handle Make from stripping newlines
55
define newline
@@ -28,7 +28,6 @@ LCOV_PROG := $(shell command -v lcov 2> /dev/null)
2828
PYCODESTYLE_PROG := $(shell command -v pycodestyle 2> /dev/null)
2929
PYFLAKES_PROG := $(shell command -v pyflakes 2> /dev/null)
3030
FLAKE8_PROG := $(shell command -v flake8 2> /dev/null)
31-
CHECK_MANIFEST_PROG := $(shell command -v check-manifest 2> /dev/null)
3231
CLANG_FORMAT_PROG := $(shell command -v clang-format 2> /dev/null)
3332
# AUTOPEP8_PROG := $(shell command -v autopep8 2> /dev/null)
3433
TEST_ARGS=
@@ -54,7 +53,7 @@ test-core: python-version
5453

5554
# CI
5655
###################################
57-
ci-prebuild: manifest lint
56+
ci-prebuild: lint
5857
ci-postbuild: coverage
5958
###################################
6059

@@ -164,15 +163,6 @@ endif
164163
$(eval DIRS += src/py-opentimelineio/opentimelineio-opentime-bindings)
165164
$(eval FILES_TO_FORMAT = $(wildcard $(addsuffix /*.h, $(DIRS)) $(addsuffix /*.cpp, $(DIRS))))
166165
$(shell clang-format -i -style=file $(FILES_TO_FORMAT))
167-
168-
manifest:
169-
ifndef CHECK_MANIFEST_PROG
170-
$(error $(newline)$(ccred)check-manifest is not available on $$PATH please see:$(newline)$(ccend)\
171-
$(ccblue) https://github.com/mgedmin/check-manifest#quick-start$(newline)$(ccend)\
172-
$(dev_deps_message))
173-
endif
174-
@check-manifest
175-
@echo "check-manifest succeeded"
176166

177167

178168
doc-model:

pyproject.toml

+92-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,97 @@
11
[build-system]
2-
requires = [
3-
"setuptools",
4-
"wheel",
5-
"cmake>=3.12",
2+
requires = ["scikit-build-core>=0.10.7"]
3+
build-backend = "scikit_build_core.build"
4+
5+
[project]
6+
name = "OpenTimelineIO"
7+
version = "0.18.0.dev1"
8+
description = "Editorial interchange format and API"
9+
authors = [
10+
{name = "Contributors to the OpenTimelineIO project", email = "[email protected]"}
11+
]
12+
license = {file = "LICENSE.txt"}
13+
keywords = ["film", "tv", "editing", "editorial", "edit", "non-linear", "edl", "time"]
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Topic :: Multimedia :: Graphics",
17+
"Topic :: Multimedia :: Video",
18+
"Topic :: Multimedia :: Video :: Display",
19+
"Topic :: Multimedia :: Video :: Non-Linear Editor",
20+
"Topic :: Software Development :: Libraries :: Python Modules",
21+
"License :: OSI Approved :: Apache Software License",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Operating System :: OS Independent",
29+
"Natural Language :: English",
30+
]
31+
32+
# Disallow 3.9.0 because of https://github.com/python/cpython/pull/22670
33+
requires-python = ">=3.7, !=3.9.0"
34+
35+
dependencies = [
36+
'importlib_metadata>=1.4; python_version < "3.8"'
37+
]
38+
39+
[project.urls]
40+
Documentation = "https://opentimelineio.readthedocs.io"
41+
Homepage = "https://opentimeline.io"
42+
Issues = "https://github.com/AcademySoftwareFoundation/OpenTimelineIO/issues"
43+
Source = "https://github.com/AcademySoftwareFoundation/OpenTimelineIO"
44+
45+
[project.scripts]
46+
otiocat = "opentimelineio.console.otiocat:main"
47+
otioconvert = "opentimelineio.console.otioconvert:main"
48+
otiopluginfo = "opentimelineio.console.otiopluginfo:main"
49+
otiostat = "opentimelineio.console.otiostat:main"
50+
otiotool = "opentimelineio.console.otiotool:main"
51+
otioview = "opentimelineview.console:main"
52+
otioautogen_serialized_schema_docs = "opentimelineio.console.autogen_serialized_datamodel:main"
53+
54+
[project.optional-dependencies]
55+
dev = [
56+
"check-manifest",
57+
"flake8>=3.5",
58+
"coverage>=4.5",
59+
"urllib3>=1.24.3",
60+
]
61+
view = [
62+
'PySide2~=5.11; platform.machine=="x86_64"',
63+
'PySide6~=6.2; platform.machine=="aarch64"',
664
]
7-
build-backend = "setuptools.build_meta"
65+
66+
[tool.scikit-build]
67+
cmake.version = "CMakeLists.txt"
68+
69+
cmake.build-type = "Release"
70+
71+
logging.level = "DEBUG"
72+
build.verbose = true
73+
74+
sdist.include = ["src/opentimelineio/adapters/builtin_adapters.plugin_manifest.json"]
75+
76+
wheel.packages = ["src/py-opentimelineio/opentimelineio", "src/opentimelineview"]
77+
wheel.install-dir = "opentimelineio"
78+
79+
build-dir = "build"
80+
81+
[[tool.scikit-build.generate]]
82+
path = "opentimelineio/__init__.py"
83+
template-path = "src/py-opentimelineio/opentimelineio/__init__.py"
84+
85+
[[tool.scikit-build.generate]]
86+
path = "opentimelineview/__init__.py"
87+
template-path = "src/opentimelineview/__init__.py"
88+
89+
[tool.scikit-build.cmake.define]
90+
OTIO_PYTHON_INSTALL = "ON"
91+
OTIO_CXX_INSTALL = "OFF"
92+
OTIO_SHARED_LIBS = "OFF"
93+
BUILD_TESTING = "OFF"
94+
OTIO_INSTALL_PYTHON_MODULES = "OFF"
895

996
[tool.cibuildwheel.linux]
1097
archs = ["x86_64", "aarch64"]

setup.cfg

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
###############################################################################
2-
# Python Distribution
3-
###############################################################################
4-
[metadata]
5-
description_file = README.md
6-
71
###############################################################################
82
# flake8
93
###############################################################################

0 commit comments

Comments
 (0)