Skip to content

Instantly share code, notes, and snippets.

@AshyIsMe
Last active January 14, 2023 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshyIsMe/05a2b445269d1b9cb67ca0cff8003b52 to your computer and use it in GitHub Desktop.
Save AshyIsMe/05a2b445269d1b9cb67ca0cff8003b52 to your computer and use it in GitHub Desktop.
guix python packaging issues - missing pytest
(define-module (python-pseudoflow)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system python)
#:use-module (guix licenses))
(define-public python-pseudoflow
(package
(name "python-pseudoflow")
(version "2022.12.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "pseudoflow" version))
(sha256
(base32
"0izdnb7xgiangvipcy0k0lbgwn3wkn4ld1ca21gy9mjp1dkisxc3"))))
(build-system python-build-system)
;;(native-inputs (list python-pytest))
(home-page "https://github.com/quic0/pseudoflow")
(synopsis "Pseudoflow algorithm for the parametric minimum cut problem.")
(description
"Pseudoflow algorithm for the parametric minimum cut problem.")
(license #f)))
@AshyIsMe
Copy link
Author

AshyIsMe commented Jan 14, 2023

This currently fails to build, I think it's missing pytest in the definition:

$ guix shell -L . python-pseudoflow
error: package: unbound variable
hint: Did you forget `(use-modules (guix packages))'?

error: package: unbound variable
hint: Did you forget `(use-modules (guix packages))'?

The following derivation will be built:
  /gnu/store/ml1fjdig1is903qnyr1ik5wcn3fzhilh-python-pseudoflow-2022.12.0.drv

building /gnu/store/ml1fjdig1is903qnyr1ik5wcn3fzhilh-python-pseudoflow-2022.12.0.drv...
\ 'check' phasebuilder for `/gnu/store/ml1fjdig1is903qnyr1ik5wcn3fzhilh-python-pseudoflow-2022.12.0.drv' failed with exit code 1
build of /gnu/store/ml1fjdig1is903qnyr1ik5wcn3fzhilh-python-pseudoflow-2022.12.0.drv failed
View build log at '/var/log/guix/drvs/ml/1fjdig1is903qnyr1ik5wcn3fzhilh-python-pseudoflow-2022.12.0.drv.bz2'.
guix shell: error: build of `/gnu/store/ml1fjdig1is903qnyr1ik5wcn3fzhilh-python-pseudoflow-2022.12.0.drv' failed

How do I include pytest in the native-inputs properly?

If I uncomment the native-inputs line I get this error:

$ guix shell -L . python-pseudoflow
error: package: unbound variable
hint: Did you forget `(use-modules (guix packages))'?

error: package: unbound variable
hint: Did you forget `(use-modules (guix packages))'?

Backtrace:
In guix/store.scm:
   661:37 19 (thunk)
   1300:8 18 (call-with-build-handler #<procedure 7fa0e9867cc0 at g…> …)
In guix/status.scm:
    815:4 17 (call-with-status-report _ _)
In guix/scripts/environment.scm:
  1080:11 16 (_)
In guix/store.scm:
  2170:25 15 (run-with-store #<store-connection 256.99 7fa0fa4832d0> …)
In guix/scripts/environment.scm:
  1082:12 14 (_ _)
In guix/profiles.scm:
    667:3 13 (_ _)
In srfi/srfi-1.scm:
   586:17 12 (map1 (#<<manifest-entry> name: "python-pseudoflow" ve…>))
In guix/profiles.scm:
  1930:19 11 (_ _)
In guix/packages.scm:
  1351:17 10 (supported-package? #<package python-pseudoflow@2022.1…> …)
In guix/memoization.scm:
    101:0  9 (_ #<hash-table 7fa0e93c1ae0 0/31> #<package python-ps…> …)
In guix/packages.scm:
  1329:37  8 (_)
  1589:16  7 (package->bag _ _ _ #:graft? _)
  1693:47  6 (thunk)
In ice-9/eval.scm:
   191:35  5 (_ #(#(#<directory (python-pseudoflow) 7fa0e82ede60>) #))
    155:9  4 (_ #(#(#<directory (python-pseudoflow) 7fa0e82ede60>) #))
   223:20  3 (proc #(#(#<directory (python-pseudoflow) 7fa0e82ed…>) …))
In unknown file:
           2 (%resolve-variable (7 . python-pytest) #<directory (pyt…>)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: python-pytest: unbound variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment