AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Installing both C++ API and Python bindings

Open
#2,007 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

I am creating a Conan recipe for OTIO for the [aswf-docker project](https://github.com/AcademySoftwareFoundation/aswf-docker) and I want to build and install both the C++ and Python APIs. I believe this means configuring with:

```
-DOTIO_CXX_INSTALL=ON
-DOTIO_PYTHON_INSTALL=ON
```

At lines 55-112 of the top level CMakeLists.txt, if `OTIO_PYTHON_INSTALL` is set, `libopentime.so` and `libopentimelineio.so` end up getting installed somewhere like `/usr/local/lib/python3.13/site-packages/opentimelineio/`

This may be surprising for C++ clients which would expect to find `libopentime.so` and `libopentimelineio.so` in `/usr/local/lib/`.

I can see how when building a Python wheel, it would be advantageous to package both the C++ DSOs as well as the pybind11 wrapper DSOs in the same place, but for a non-wheels build, it seems it would be preferable to have the C++ DSOs end up in /usr/local/lib and have the pybind11 wrapper DSOs link against those, either relying on rpath or LD_LIBRARY_PATH.

Should there be (or is there) a mechanism which would differentiate a build for the purposes of creating a Python wheel from a non wheel build?

Contributor guide

Open the contributing guide

Research direction

Start with the top-level CMakeLists.txt at lines 55-112 and configure a build with OTIO_CXX_INSTALL=ON and OTIO_PYTHON_INSTALL=ON. Compare the install locations of libopentime.so, libopentimelineio.so, and the Python wrapper DSOs for wheel and non-wheel builds. Done means the intended distinction and resulting install layout are agreed and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.