Skip to content

Commit 33b328b

Browse files
authored
CMake install pure-python packages (#1238)
Signed-off-by: Michael Dolan <[email protected]>
1 parent 42aa415 commit 33b328b

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ project(OpenTimelineIO VERSION ${OTIO_VERSION} LANGUAGES C CXX)
2525
# maintenance and troubleshooting
2626

2727
# Installation options
28-
option(OTIO_CXX_INSTALL "Install the C++ bindings" ON)
29-
option(OTIO_PYTHON_INSTALL "Install the Python bindings" OFF)
30-
option(OTIO_DEPENDENCIES_INSTALL "Install OTIO's C++ header dependencies (any and nonstd)" ON)
28+
option(OTIO_CXX_INSTALL "Install the C++ bindings" ON)
29+
option(OTIO_PYTHON_INSTALL "Install the Python bindings" OFF)
30+
option(OTIO_DEPENDENCIES_INSTALL "Install OTIO's C++ header dependencies (any and nonstd)" ON)
3131
option(OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON)
32+
option(OTIO_INSTALL_CONTRIB "Install the opentimelineio_contrib Python package" ON)
3233
set(OTIO_PYTHON_INSTALL_DIR "" CACHE STRING "Python installation dir (such as the site-packages dir)")
3334

3435
# Build options

src/py-opentimelineio/CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
1+
#------------------------------------------------------------------------------
2+
# py-opentimelineio/CMakeLists.txt
3+
14
add_subdirectory(opentime-bindings)
25
add_subdirectory(opentimelineio-bindings)
6+
7+
# Install pure-python OTIO packages to match PyPI wheel structure
8+
install(DIRECTORY "${PROJECT_SOURCE_DIR}/src/py-opentimelineio/opentimelineio/"
9+
DESTINATION "${OTIO_RESOLVED_PYTHON_INSTALL_DIR}/opentimelineio")
10+
11+
if(OTIO_INSTALL_COMMANDLINE_TOOLS)
12+
install(DIRECTORY "${PROJECT_SOURCE_DIR}/src/opentimelineview"
13+
DESTINATION "${OTIO_RESOLVED_PYTHON_INSTALL_DIR}")
14+
endif()
15+
16+
if(OTIO_INSTALL_CONTRIB)
17+
install(DIRECTORY "${PROJECT_SOURCE_DIR}/contrib/opentimelineio_contrib"
18+
DESTINATION "${OTIO_RESOLVED_PYTHON_INSTALL_DIR}"
19+
PATTERN "tests" EXCLUDE
20+
PATTERN "Makefile" EXCLUDE)
21+
endif()

0 commit comments

Comments
 (0)