unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 59156@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#59156] [PATCH] gnu: python-mdurl: Enable tests
Date: Wed,  9 Nov 2022 19:59:51 +0000	[thread overview]
Message-ID: <20221109195951.30629-1-sharlatanus@gmail.com> (raw)

* gnu/packages/python-xyz.scm (python-mdurl): Enable tests.
  [source]: Use git checkout with tests.
  [build-system]: Use pyproject-build-system.
  [native-inputs]: Add python-pytest.
---
 gnu/packages/python-xyz.scm | 33 +++++++++++----------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b2fb101409..9c7874e576 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -783,28 +783,17 @@ (define-public python-mdurl
   (package
     (name "python-mdurl")
     (version "0.1.2")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "mdurl" version))
-              (sha256
-               (base32
-                "1fn1hy35h9grggwqax90zcb52inlfxrxsm27vlqqz8zfyllkshdv"))))
-    (build-system python-build-system)
-    (arguments
-     (list
-      #:tests? #f                       ;pypi source does not contain tests
-      #:phases
-      #~(modify-phases %standard-phases
-          (replace 'build
-            (lambda _ (invoke "flit" "build")))
-          (replace 'install
-            (lambda _
-              (for-each
-               (lambda (wheel)
-                 (invoke "python" "-m" "pip" "install"
-                         wheel (string-append "--prefix=" #$output)))
-               (find-files "dist" "\\.whl$")))))))
-    (native-inputs (list python-flit))
+    (source
+     (origin
+       (method git-fetch)   ; no tests data in PyPi package
+       (uri (git-reference
+             (url "https://github.com/executablebooks/mdurl")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0csc777q42jzv4zgdzxmwp8xqlb92ws1jvj09m2smh4klw67q5f3"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-flit python-pytest))
     (home-page "https://github.com/executablebooks/mdurl")
     (synopsis "Markdown URL utilities")
     (description
-- 
2.38.0





             reply	other threads:[~2022-11-09 20:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 19:59 Sharlatan Hellseher [this message]
2022-11-15 10:31 ` bug#59156: [PATCH] gnu: python-mdurl: Enable tests Efraim Flashner

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=20221109195951.30629-1-sharlatanus@gmail.com \
    --to=sharlatanus@gmail.com \
    --cc=59156@debbugs.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).