Skip to content

Commit

Permalink
Merge pull request #69 from browniebroke/psycopg2-source
Browse files Browse the repository at this point in the history
Let users choose between psycopg2 binary or source
  • Loading branch information
shimizukawa authored Nov 8, 2020
2 parents 6f20688 + 460ee0c commit 44ed75f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
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

0 comments on commit 44ed75f

Please sign in to comment.