Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: Install Traitgen
run: python -m pip install openassetio-traitgen

- name: Install Python test dependencies
run: python -m pip install -r tests/python/requirements.txt

- name: Configure CMake build
run: |
cmake -S . -DCMAKE_PREFIX_PATH=$(pwd)/openassetio -B build -G Ninja --preset test
Expand Down
3 changes: 2 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": true
},
"cacheVariables": {
"OPENASSETIO_MEDIACREATION_ENABLE_TEST": "ON"
"OPENASSETIO_MEDIACREATION_ENABLE_TEST": "ON",
"OPENASSETIO_MEDIACREATION_GENERATE_PYTHON": "ON"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging/python.dist-info/METADATA.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Metadata-Version: 2.1
Name: openassetio-mediacreation
Version: @OPENASSETIO_MEDIACREATION_PYTHON_PACKAGE_VERSION@
Version: @OPENASSETIO_MEDIACREATION_PYTHON_PKG_VERSION@
8 changes: 2 additions & 6 deletions tests/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ target_compile_features(test.cpp PRIVATE cxx_std_17)

if (OPENASSETIO_MEDIACREATION_ENABLE_PYTHON_INSTALL_DIST_INFO)

# Build the command to extend the PYTHONPATH such that the
# site-packages directory in the install tree is included correctly.
set(_set_pythonpath_command
PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${OPENASSETIO_MEDIACREATION_PYTHON_SITEDIR})

# Add pytest target to run the packaging tests. These are concerned
# with python metadata information so run in a python context.
add_custom_target(
openassetio-mediacreation.tests.packaging
COMMAND cmake -E echo -- "Running pytest check for CMake dist-info packaging"
COMMAND ${_set_pythonpath_command} &&
COMMAND ${CMAKE_COMMAND} -E env
PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${OPENASSETIO_MEDIACREATION_PYTHON_SITEDIR}
pytest -v --capture=tee-sys
"${CMAKE_CURRENT_LIST_DIR}/test_cmake.py"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
Expand Down