Patchwork [1/6] gnu: Enable python-psycopg2 support in python-sqlalchemy.

login
register
mail settings
Submitter Danny Milosavljevic
Date Nov. 3, 2016, 10:55 a.m.
Message ID <20161103105604.2937-2-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/17155/
State New
Headers show

Comments

Danny Milosavljevic - Nov. 3, 2016, 10:55 a.m.
* gnu/packages/python.scm (python-sqlalchemy): Modified.
---
 gnu/packages/python.scm | 2 ++
 1 file changed, 2 insertions(+)
Hartmut Goebel - Nov. 3, 2016, 9:42 p.m.
Am 03.11.2016 um 11:55 schrieb Danny Milosavljevic:
> +    (propagated-inputs
> +     `(("python-psycopg2" ,python-psycopg2)))

I don't think this is a good idea. sqlalchemy is database independent
requireing *any* database backend and the admin or the developer is
responsible for installing the required package.

If the system is not using postgresql, this is just useless. And if OTOH
we'd include all possible backends we'd end up with a huge package.

Or did I miss something?
Danny Milosavljevic - Nov. 3, 2016, 10:14 p.m.
Hi,

On Thu, 3 Nov 2016 22:42:48 +0100
Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:

> Am 03.11.2016 um 11:55 schrieb Danny Milosavljevic:
> > +    (propagated-inputs
> > +     `(("python-psycopg2" ,python-psycopg2)))  
> 
> I don't think this is a good idea. sqlalchemy is database independent
> requireing *any* database backend and the admin or the developer is
> responsible for installing the required package.
> 
> If the system is not using postgresql, this is just useless. And if OTOH
> we'd include all possible backends we'd end up with a huge package.
> 
> Or did I miss something?

No, I think you are right.

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b7c9e11..e52bc8d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3807,6 +3807,8 @@  as the original project seems to have been abandoned circa 2007.")
        (base32
         "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-psycopg2" ,python-psycopg2)))
     (native-inputs
      `(("python-cython" ,python-cython) ;for c extensions
        ("python-pytest" ,python-pytest)