unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Antwane Mason <ad.mason1413@gmail.com>
To: help-guix@gnu.org
Subject: Re: Python Package Build Issue
Date: Thu, 26 Aug 2021 08:11:30 -0400	[thread overview]
Message-ID: <CAAztfg+Yyut7O7dVGrfBd3Ex4=T_rfG0QAad3WBWr_qwJ0TZXA@mail.gmail.com> (raw)
In-Reply-To: <CAAztfgKdGBGSkfP7OzRvXJ2NkT8kFQHUwMbLU8wJUjaG-HoS=w@mail.gmail.com>

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	other threads:[~2021-08-26 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 12:29 Python Package Build Issue Antwane Mason
2021-08-26 12:11 ` Antwane Mason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAztfg+Yyut7O7dVGrfBd3Ex4=T_rfG0QAad3WBWr_qwJ0TZXA@mail.gmail.com' \
    --to=ad.mason1413@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).