GNU bug report logs - #51963
[PATCH 0/4] gnu: Add pgcli.

Previous Next

Package: guix-patches;

Reported by: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>

Date: Fri, 19 Nov 2021 05:57:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51963 in the body.
You can then email your comments to 51963 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51963; Package guix-patches. (Fri, 19 Nov 2021 05:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Foo Chuan Wei <chuanwei.foo <at> hotmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 19 Nov 2021 05:57:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/4] gnu: Add pgcli.
Date: Fri, 19 Nov 2021 05:41:12 +0000
Foo Chuan Wei (4):
  gnu: python-pendulum: Add setup.py to fix build.
  gnu: Add python-pgspecial.
  gnu: Add python-ipython-sql.
  gnu: Add pgcli.

 gnu/packages/databases.scm  | 55 +++++++++++++++++++++++++++++++++++++
 gnu/packages/python-xyz.scm | 34 +++++++++++++++++++++++
 gnu/packages/time.scm       | 26 ++++++++++++++++--
 3 files changed, 112 insertions(+), 3 deletions(-)


base-commit: 188e3e2e6878346b0bdc8b46084f458abe86826c
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#51963; Package guix-patches. (Fri, 19 Nov 2021 05:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 51963 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 51963 <at> debbugs.gnu.org
Subject: [PATCH 1/4] gnu: python-pendulum: Add setup.py to fix build.
Date: Fri, 19 Nov 2021 05:58:12 +0000
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#51963; Package guix-patches. (Fri, 19 Nov 2021 06:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 51963 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 51963 <at> debbugs.gnu.org
Subject: [PATCH 2/4] gnu: Add python-pgspecial.
Date: Fri, 19 Nov 2021 05:59:12 +0000
* gnu/packages/databases.scm (python-pgspecial): New variable.
---
 gnu/packages/databases.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index de161e1864..5636d717b6 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -53,6 +53,7 @@
 ;;; Copyright © 2021 Simon Streit <simon <at> netpanic.org>
 ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo <at> member.fsf.org>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -615,6 +616,29 @@ replacement for the code@{python-memcached} library.")
 (define-public python2-pylibmc
   (package-with-python2 python-pylibmc))
 
+(define-public python-pgspecial
+  (package
+    (name "python-pgspecial")
+    (version "1.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pgspecial" version))
+       (sha256
+        (base32 "00ddkf565rjcxmfml1z4mmkns1aq8x5s5g85xmnz2scln42y4irq"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-sqlparse" ,python-sqlparse)
+       ("python-psycopg2" ,python-psycopg2)))
+    (home-page "https://github.com/dbcli/pgspecial")
+    (synopsis
+     "Python implementation of PostgreSQL meta commands (backslash commands)")
+    (description
+     "This Python package provides an API to execute meta-commands (AKA
+\"special\", or \"backslash commands\") on PostgreSQL.")
+    (license license:bsd-3)))
+
 (define-public mycli
   (package
     (name "mycli")
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#51963; Package guix-patches. (Fri, 19 Nov 2021 06:01:01 GMT) Full text and rfc822 format available.

Message #14 received at 51963 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 51963 <at> debbugs.gnu.org
Subject: [PATCH 3/4] gnu: Add python-ipython-sql.
Date: Fri, 19 Nov 2021 06:00:07 +0000
* gnu/packages/python-xyz.scm (python-ipython-sql): New variable.
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a6f8b10bf7..f8313742c5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8303,6 +8303,40 @@ profile, launches a cluster and returns a view.  On program exit it shuts the
 cluster down and deletes the throwaway profile.")
     (license license:expat)))
 
+(define-public python-ipython-sql
+  (package
+    (name "python-ipython-sql")
+    (version "0.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ipython-sql" version))
+       (sha256
+        (base32 "0v74ayc6vw98f4jljmwy45qpqbcbhlrb4g1qdyypq9sppxcqx21y"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-build
+           (lambda _
+             ;; The "NEWS.rst" file is missing from the PyPI distribution.
+             ;; (see: https://github.com/catherinedevlin/ipython-sql/issues/164)
+             (substitute* "setup.py"
+               (("NEWS = [^\n]*") "")
+               (("long_description=README \\+ '\\\\n\\\\n' \\+ NEWS,")
+                "long_description=README,")))))))
+    (propagated-inputs
+     `(("python-ipython" ,python-ipython)
+       ("python-ipython-genutils" ,python-ipython-genutils)
+       ("python-prettytable" ,python-prettytable)
+       ("python-six" ,python-six)
+       ("python-sqlalchemy" ,python-sqlalchemy)
+       ("python-sqlparse" ,python-sqlparse)))
+    (home-page "https://github.com/catherinedevlin/ipython-sql")
+    (synopsis "RDBMS access via IPython")
+    (description "%sql and %%sql magic for IPython.")
+    (license license:expat)))
+
 (define-public python-traitlets
   (package
     (name "python-traitlets")
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#51963; Package guix-patches. (Fri, 19 Nov 2021 06:02:02 GMT) Full text and rfc822 format available.

Message #17 received at 51963 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 51963 <at> debbugs.gnu.org
Subject: [PATCH 4/4] gnu: Add pgcli.
Date: Fri, 19 Nov 2021 06:00:48 +0000
* gnu/packages/databases.scm (pgcli): New variable.
---
 gnu/packages/databases.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5636d717b6..ee5ca569d9 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -639,6 +639,37 @@ replacement for the code@{python-memcached} library.")
 \"special\", or \"backslash commands\") on PostgreSQL.")
     (license license:bsd-3)))
 
+(define-public pgcli
+  (package
+    (name "pgcli")
+    (version "3.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pgcli" version))
+       (sha256
+        (base32 "1dy6yzak696107pqv83296h0xhc3ahlfaydm80593gwn37krgpkc"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-cli-helpers" ,python-cli-helpers)
+       ("python-click" ,python-click)
+       ("python-configobj" ,python-configobj)
+       ("python-pendulum" ,python-pendulum)
+       ("python-pgspecial" ,python-pgspecial)
+       ("python-prompt-toolkit" ,python-prompt-toolkit)
+       ("python-psycopg2" ,python-psycopg2)
+       ("python-pygments" ,python-pygments)
+       ("python-setproctitle" ,python-setproctitle)
+       ("python-sqlparse" ,python-sqlparse)))
+    (native-inputs
+     `(("python-ipython-sql" ,python-ipython-sql)))
+    (home-page "https://www.pgcli.com")
+    (synopsis "PostgreSQL CLI with autocompletion and syntax highlighting")
+    (description
+     "@code{pgcli} is a command line interface for PostgreSQL with
+autocompletion and syntax highlighting.")
+    (license license:bsd-3)))
+
 (define-public mycli
   (package
     (name "mycli")
-- 
2.25.1





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Fri, 14 Jan 2022 09:21:01 GMT) Full text and rfc822 format available.

Notification sent to Foo Chuan Wei <chuanwei.foo <at> hotmail.com>:
bug acknowledged by developer. (Fri, 14 Jan 2022 09:21:01 GMT) Full text and rfc822 format available.

Message #22 received at 51963-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 51963-done <at> debbugs.gnu.org
Subject: Re: [bug#51963] [PATCH 0/4] gnu: Add pgcli.
Date: Fri, 14 Jan 2022 10:20:27 +0100
Hello,

Foo Chuan Wei <chuanwei.foo <at> hotmail.com> writes:

> Foo Chuan Wei (4):
>   gnu: python-pendulum: Add setup.py to fix build.
>   gnu: Add python-pgspecial.
>   gnu: Add python-ipython-sql.
>   gnu: Add pgcli.

I tried to expound python-ipython-sql description, I moved everything to
new package style, then I applied the patch set.

Thank you.

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Feb 2022 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.