Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1101: correct Nix pytket setup version #1104

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

jake-arkinstall
Copy link
Contributor

Previously the version was set in the nix build, but was not bubbled to the python project metadata. This was problematic, as shown in #1101. The root cause was that, although the copying of _version.py was done, the initial build stage did not have access to the version from .git, via setuptools_scm.

Rather than copying .git into the nix store, the version is already known and can be injected into setup.py directly. It might require further work to identify a more future-proof, universal approach, but this avoids modifications that might impact non-nix builds.

jake-arkinstall and others added 3 commits October 30, 2023 13:46
The core pytket project uses setuptools_scm to extract
version information from .git. This would be awkward in
Nix as it would involve copying the .git directory into
the pytket source.

As we already have the version extracted from another
file in the project, which is used to set the version
number on the Nix side, we can instead hardcode this
version number into setup.py when copying it to the
derivation source.
@cqc-alec cqc-alec merged commit 63c2e03 into CQCL:develop Oct 30, 2023
30 checks passed
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.

2 participants