diff mbox series

[bug#51963,3/4] gnu: Add python-ipython-sql.

Message ID PU1PR01MB2155AEF341240DC3E01C1BC08D9C9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
State New
Headers show
Series gnu: Add pgcli. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Foo Chuan Wei Nov. 19, 2021, 6 a.m. UTC
* gnu/packages/python-xyz.scm (python-ipython-sql): New variable.
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox series

Patch

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