Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let users choose between psycopg2 binary or source #69

Merged
merged 2 commits into from
Nov 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion doc/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ Please install django-redshift-backend with using pip (8.1.1 or later).

$ pip install django-redshift-backend

This backend requires ``psycopg2``, which may be installed from source or wheel (pre-built binaries).
If you don't want to specify it separately, you may install it using extra:

.. code-block:: bash

# For pre-built binary
$ pip install django-redshift-backend[psycopg2-binary]

# For the source distribution
$ pip install django-redshift-backend[psycopg2]

Please refer to the `psycopg2 documentation`_ for more details on the topic.

.. _psycopg2 documentation: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary

Django settings
===============
Expand All @@ -30,4 +44,3 @@ ENGINE for DATABASES is 'django_redshift_backend'. You can set the name in your

For more information, please refer :doc:`refs`.


5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

requires = [
'django',
'psycopg2-binary',
]


Expand All @@ -25,6 +24,10 @@ def read(filename):
description='Redshift database backend for Django',
long_description=read('README.rst') + read('CHANGES.rst'),
install_requires=requires,
extra_requires={
'psycopg2-binary': ['psycopg2-binary'],
'psycopg2': ['psycopg2'],
},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down