jazzband / django-redshift-backend

Redshift database backend for Django
Apache License 2.0
83 stars 47 forks source link

Let users choose between psycopg2 and psycopg2-binary #60

Closed asherf closed 5 years ago

asherf commented 5 years ago

Switch to psycopg2-binary

if you run the plain python 3.7 image from docker hub, installing this package fails. docker run -it python:3.7.3-slim-stretch /bin/sh

Screenshot 2019-07-11 15 13 17
asherf commented 5 years ago

ping @Surgo @shimizukawa

aaugustin commented 5 years ago

I'm facing the same issue. The description is misleading; I'm fixing it.

django-redshift-backend depends on psycopg2, which has become a source-only package again. Pre-built wheels are available in the psycopg2-binary package.

After reading why the psycopg2 / psycopg2-binary split exists, I don't think that django-redshift-backend can make a good choice for all users.

Would it be best to remove the dependency and tell users to install the version that works for them? psycopg2-binary if they don't have the prerequisites for compilation, psycopg2 if they're hitting the segfaults caused by psycopg2-binary.

ryankuczka commented 5 years ago

I am also facing this issue. I do not have the prerequisites to install psycopg2 and would prefer to use psycopg2-binary which is currently restricting me from using this library as-is.

Currently I've found a couple workarounds, but neither of them are ideal. The first is to install this package with --no-deps, however, this requires installing this package separately from the rest of my project's requirements. The second is to use psycopg2<2.8 which can install a pre-built wheel at the expense of not being the latest version and an annoying warning instructing the user to use pscyopg2-binary.

Surgo commented 5 years ago

Thank you @asherf

Surgo commented 5 years ago

Sorry late action :(