Hi ListFollowing the excellent blog post from Ludo [1] to guixify my python project, I wanted to include a version string from file to have a single source for the guix files and also for the python pyproject.toml file.
Something along this:
(define-public my-package (let* ((vcs-file? (or (git-predicate %source-dir) (const #t))) (version-file "VERSION") (version-from-file (call-with-input-file version-file get-string-all))) (package (name "my-package") (version version-from-file) (source (local-file "../.." "my-package-checkout" #:recursive? #t #:select? vcs-file?)) (build-system pyproject-build-system) ...this seems to work when I build locally but throws an error when I build after a guix pull:
(exception system-error (value "open-file") (value "~A: ~S") (value ("No such file or directory" "VERSION")) (value (2)))
How can I achieve this? Thanks for your input! Best, Reza[1] https://guix.gnu.org/en/blog/2023/from-development-environments-to-continuous-integrationthe-ultimate-guide-to-software-development-with-guix/
-- Reza Housseini This message is signed with my GnuPG key: C0F3 0812 9AF2 80F4 0830 C2C1 C375 C6AF 0512 5C52
OpenPGP_0xC375C6AF05125C52.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature