Skip to content

Conversation

@feltech
Copy link
Member

@feltech feltech commented Jan 8, 2026

Closes #123.

The CMake script has the ability to simulate a Python package installation, such that a dist-info metadata directory is installed alongside the package, effectively preventing accidental overwrite by other package managers (e.g. pip) when the project is installed via CMake - see #58.

However, the Version field in the METADATA file that forms part of the Python package dist-info was not being properly filled in.

This was not caught by CI because the test for it is only enabled if generation of Python traits via CMake is enabled (i.e. OPENASSETIO_MEDIACREATION_GENERATE_PYTHON), which was not the case for the "test" CMake preset used by the "Test Cpp" CI job.

There was another problem with running the test, in that the PYTHONPATH was not properly set in the CMake test target, and so the test would not necessarily be able to locate the openassetio-mediacreation package installed by CMake.

Closes OpenAssetIO#123.

The CMake script has the ability to simulate a Python package
installation, such that a `dist-info` metadata directory is installed
alongside the package, effectively preventing accidental overwrite by
other package managers (e.g. pip) when the project is installed via
CMake - see OpenAssetIO#58.

However, the `Version` field in the `METADATA` file that forms part
of the Python package `dist-info` was not being properly filled in.

This was not caught by CI because the test for it is only enabled if
generation of Python traits via CMake is enabled (i.e.
`OPENASSETIO_MEDIACREATION_GENERATE_PYTHON`), which was not the case
for the "test" CMake preset used by the "Test Cpp" CI job.

There was another problem with running the test, in that the PYTHONPATH
was not properly set in the CMake test target, and so the test would not
necessarily be able to locate the `openassetio-mediacreation` package
installed by CMake.

Signed-off-by: David Feltell <david.feltell@foundry.com>
@feltech feltech self-assigned this Jan 8, 2026
@feltech feltech requested a review from a team as a code owner January 8, 2026 11:14
@feltech feltech requested a review from hutchinson January 8, 2026 11:23
@feltech
Copy link
Member Author

feltech commented Jan 8, 2026

MacOS CI is failing pending #125

@feltech feltech changed the title [Build] Fix incorrect Version metadata in dist-info Fix incorrect Version metadata in dist-info Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix population of CMake-generated Python dist-info METADATA file's Version field

1 participant