all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Foo Chuan Wei <chuanwei.foo@hotmail.com>
To: 51963@debbugs.gnu.org
Subject: [bug#51963] [PATCH 1/4] gnu: python-pendulum: Add setup.py to fix build.
Date: Fri, 19 Nov 2021 05:58:12 +0000	[thread overview]
Message-ID: <PU1PR01MB2155F73AEE9B507D30E40C9E8D9C9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <PU1PR01MB2155E250F97582738ED2FDD38D9C9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com>

* gnu/packages/time.scm (python-pendulum)[arguments]: Add setup.py
  to fix build.
---
 gnu/packages/time.scm | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index b60fab5db5..7585a665d3 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -155,9 +155,29 @@ saving time.  Almost all of the Olson timezones are supported.")
        (sha256
         (base32 "01zjc245w08j0xryrgrq9vng59q1cl5ry0hcpw5rj774pyhhqsmh"))))
     (build-system python-build-system)
-    ;; XXX: The PyPI distribution lacks tests, and the upstream repository
-    ;; lacks a setup.py!
-    (arguments '(#:tests? #f))
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   ;; Add setup.py to fix the build. Otherwise, the build will
+                   ;; fail with "no setup.py found".
+                   ;;
+                   ;; Upstream uses Poetry to build python-pendulum, including
+                   ;; parts written in C. Here, we simply add a setup.py file
+                   ;; and do not build the parts written in C. This is possible
+                   ;; because python-pendulum falls back on pure Python code
+                   ;; when the C parts are not available (reference: build.py).
+                   (add-after 'unpack 'add-setup.py
+                     (lambda _
+                       (call-with-output-file "setup.py"
+                         (lambda (port)
+                           (format port
+                                   "from setuptools import find_packages, setup
+setup(name='pendulum',
+      version='~a',
+      packages=find_packages())
+"
+                                   ,version))))))
+                 ;; XXX: The PyPI distribution lacks tests.
+                 #:tests? #f))
     (propagated-inputs
      `(("python-dateutil" ,python-dateutil)
        ("python-pytzdata" ,python-pytzdata)))
-- 
2.25.1





  reply	other threads:[~2021-11-19  5:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  5:41 [bug#51963] [PATCH 0/4] gnu: Add pgcli Foo Chuan Wei
2021-11-19  5:58 ` Foo Chuan Wei [this message]
2021-11-19  5:59 ` [bug#51963] [PATCH 2/4] gnu: Add python-pgspecial Foo Chuan Wei
2021-11-19  6:00 ` [bug#51963] [PATCH 3/4] gnu: Add python-ipython-sql Foo Chuan Wei
2021-11-19  6:00 ` [bug#51963] [PATCH 4/4] gnu: Add pgcli Foo Chuan Wei
2022-01-14  9:20 ` bug#51963: [PATCH 0/4] " Nicolas Goaziou

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

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

  git send-email \
    --in-reply-to=PU1PR01MB2155F73AEE9B507D30E40C9E8D9C9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com \
    --to=chuanwei.foo@hotmail.com \
    --cc=51963@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.