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

[devfix] Simplify PostgreSQL install #82

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

mcovalt
Copy link
Contributor

@mcovalt mcovalt commented Mar 24, 2020

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 in pip. 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 with psycopg2-binary. During the Docker build stage, the psycopg2 requirement is swapped back in.

@mcovalt mcovalt added requirements devfix A developer fix to a release branch unrelated to a feature ticket labels Mar 24, 2020
@debboutr debboutr self-assigned this Mar 26, 2020
@debboutr debboutr merged commit a7f2c19 into dabih-release Mar 27, 2020
@debboutr debboutr added this to the Dabih milestone Mar 27, 2020
@debboutr
Copy link
Contributor

this works as prescribed, tried out both the dockerfile and the new env. The only thing that I'm not sure of is whether or not we can take out the Visual Studio install that we have in the wiki. I can install it on my windows machine, but I need admin rights to uninstall. I updated the developer setup on the wiki to account for this. Thanks!

@debboutr debboutr deleted the devfix-simple-postgresql branch August 5, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devfix A developer fix to a release branch unrelated to a feature ticket requirements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants