[devfix] Simplify PostgreSQL install #82
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR simplifies the PostgreSQL install by using the "binary" package in requirements.txt. It allows a much simpler developer environment setup. All the dependency steps in the Wiki can be removed if this is merged.
Background
In version 2.7, the PostgreSQL driver
pyscopg2
delivered the pre-compiled binary along with the source. This allowed developers to install the driver without the need to compile it with external dependencies. It also allowed a production environment to compile it from source with the the--no-binary
flag inpip
. This is standard practice for PyPI packages.This was changed in version 2.8, however. There are now two interchangeable packages:
pyscopg2-binary
: always installs the pre-compiled driver (recommended for development environments)psycopg2
: always builds the driver from source (recommended for production environments)Fix
The
psycopg2
requirement was replaced withpsycopg2-binary
. During the Docker build stage, thepsycopg2
requirement is swapped back in.