Skip to content

Commit ff2d6a7

Browse files
authored
Merge pull request #124 from feltech/work/123-fixMETADATAVersionField
Fix incorrect Version metadata in dist-info
2 parents 37192e9 + b0899fa commit ff2d6a7

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Install Traitgen
4747
run: python -m pip install openassetio-traitgen
4848

49+
- name: Install Python test dependencies
50+
run: python -m pip install -r tests/python/requirements.txt
51+
4952
- name: Configure CMake build
5053
run: |
5154
cmake -S . -DCMAKE_PREFIX_PATH=$(pwd)/openassetio -B build -G Ninja --preset test

CMakePresets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": true
88
},
99
"cacheVariables": {
10-
"OPENASSETIO_MEDIACREATION_ENABLE_TEST": "ON"
10+
"OPENASSETIO_MEDIACREATION_ENABLE_TEST": "ON",
11+
"OPENASSETIO_MEDIACREATION_GENERATE_PYTHON": "ON"
1112
}
1213
}
1314
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Metadata-Version: 2.1
22
Name: openassetio-mediacreation
3-
Version: @OPENASSETIO_MEDIACREATION_PYTHON_PACKAGE_VERSION@
3+
Version: @OPENASSETIO_MEDIACREATION_PYTHON_PKG_VERSION@

tests/cpp/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,13 @@ target_compile_features(test.cpp PRIVATE cxx_std_17)
1717

1818
if (OPENASSETIO_MEDIACREATION_ENABLE_PYTHON_INSTALL_DIST_INFO)
1919

20-
# Build the command to extend the PYTHONPATH such that the
21-
# site-packages directory in the install tree is included correctly.
22-
set(_set_pythonpath_command
23-
PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${OPENASSETIO_MEDIACREATION_PYTHON_SITEDIR})
24-
2520
# Add pytest target to run the packaging tests. These are concerned
2621
# with python metadata information so run in a python context.
2722
add_custom_target(
2823
openassetio-mediacreation.tests.packaging
2924
COMMAND cmake -E echo -- "Running pytest check for CMake dist-info packaging"
30-
COMMAND ${_set_pythonpath_command} &&
25+
COMMAND ${CMAKE_COMMAND} -E env
26+
PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${OPENASSETIO_MEDIACREATION_PYTHON_SITEDIR}
3127
pytest -v --capture=tee-sys
3228
"${CMAKE_CURRENT_LIST_DIR}/test_cmake.py"
3329
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"

0 commit comments

Comments
 (0)