help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python Package Build Issue


From: Antwane Mason
Subject: Re: Python Package Build Issue
Date: Thu, 26 Aug 2021 08:11:30 -0400

I was able to solve the issue with packaging python-fido2 definition. I
think the problem was that because the setup.py didn't specify where to
look for unit tests, it was loading up all of the project's modules to look
for them. Since this project is cross-platform, it contained code that was
windows specific in win_api.py. Changing the check build phase to invoke
"pipenv run test"  fixed the issue. This project recommends using pipenv to
run its tests in its README. Below is the updated package definition for
reference. Once I get python-onlykey and its dependencies built, I plan on
submitting a patch.

-------------------------------------------------------------------------
(define-public python-fido2
  (package
  (name "python-fido2")
  (version "0.9.1")
  (source
    (origin
      (method url-fetch)
      (uri (pypi-uri "fido2" version))
      (sha256
        (base32
          "0vpyknka7wa4jl1xhvhli48wk70dih7hm45kdrchf8wf4cjyx046"))))
  (build-system python-build-system)
  (arguments
     '(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               (invoke "pipenv" "run" "test")))))))
  (propagated-inputs
    `(("python-cryptography" ,python-cryptography)
      ("python-six" ,python-six)))
  (native-inputs
   `(("python-pipenv" ,python-pipenv)))
  (home-page
    "https://github.com/Yubico/python-fido2";)
  (synopsis "Python based FIDO 2.0 library")
  (description "Python based FIDO 2.0 library")
  (license '(license:bsd-2 license:asl2.0 license:mpl2.0))))
-------------------------------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]