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

Depend on psycopg2-binary instead of psycopg2. #357

Closed
wants to merge 1 commit into from

Conversation

torotil
Copy link
Contributor

@torotil torotil commented May 14, 2020

This makes it possible to install the Python venv without the need to compile anything.

fixes #323

@dracos
Copy link
Member

dracos commented May 14, 2020

I understand why this would be nice for development/ease of setup; however psycopg2 says, at https://www.psycopg.org/docs/install.html#install-from-source "If you are the maintainer of a published package depending on psycopg2 you shouldn’t use ‘psycopg2-binary’ as a module dependency. For production use you are advised to use the source distribution."
If a user of mapit wishes to use psycopg2-binary they can of course specify it themselves in their requirements and it will be used.

@torotil
Copy link
Contributor Author

torotil commented May 15, 2020

Thanks I didn’t know that. Is there a way of specifying it only as dev-dependency then?

@dracos
Copy link
Member

dracos commented May 15, 2020

Python packaging, as far as I know, does not have such a concept. If you wish to use the binary package, you can install it in your venv first, manually, or (I guess) by specifying it first in your own requirements.txt

Looking at psycopg/psycopg2#674, I don't want to get involved with that :)

@torotil torotil closed this May 16, 2020
@torotil torotil deleted the psycopg2-binary branch April 8, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deal with psycopg2 binary change
2 participants