-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(dev): Install postgresql on Apple M1 to build psycopg2-binary #28607
Conversation
Create a new target which installs different libraries via brew depending on the context. For instance, on Apple M1 machines it should installed a couple more libraries. In the future, the bootstrap script and documentation should be using this target. Fixes #28606
requirements-base.txt
Outdated
psycopg2-binary==2.8.6 | ||
psycopg2-binary==2.8.6; python_version == '3.6' | ||
# This removes needing to set CPPFLAGS & LDFLAGS | ||
psycopg2-binary==2.9.1; python_version > '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't do this, I would have to do this somewhere in install-py-dev
:
CPPFLAGS="-I/opt/homebrew/opt/[email protected]/include" \
LDFLAGS="-L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/[email protected]/lib" \
pip install psycopg2-binary==2.8.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You won't be installing this on 3.8.
Ignoring psycopg2-binary: markers 'python_version == "3.6"' don't match your environment
Ignoring psycopg2-binary: markers 'python_version > "3.8"' don't match your environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! It was a last second commit that introduced the problem. I've corrected this and tested it out.
@@ -24,7 +24,7 @@ jobs: | |||
fail-fast: false | |||
env: | |||
PIP_DISABLE_PIP_VERSION_CHECK: on | |||
# Make the environment more similar to what Mac defaults to | |||
# Make the environment more similar to hat Mac defaults to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mistake?
requirements-base.txt
Outdated
@@ -35,7 +35,9 @@ Pillow==8.2.0; python_version == '3.6' | |||
Pillow==8.3.1; python_version > '3.6' | |||
progressbar2==3.32.0 | |||
python-rapidjson==1.4 | |||
psycopg2-binary==2.8.6 | |||
psycopg2-binary==2.8.6; python_version == '3.6' | |||
# This removes needing to set CPPFLAGS & LDFLAGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we note that this only affects local development since we only support 3.6 in prod atm?
…28607) Create a new target which installs different libraries via brew depending on the context. For instance, on Apple M1 machines it should installed a couple more libraries. This helps to install the psycopg2-binary package since there's no wheel for it. We also upgrade the version of it in order to avoid needing to set some CPPFLAGS & LDFLAGS. In the future, the bootstrap script and documentation should be using this target. Fixes #28606
For the incompatibility issue with Django visit [this issue][incompatible], In this PR, we're going to downgrade to the compatible 2.8.6 version (thus, matching the Python 3.6 version), removing the need to install `postgresql` (this means partially reverting #28607) and instead installing a wheel I built on my machine that I have stored in GC storage. Fixes #28958 [incompatible]: psycopg/psycopg2#1293
For the incompatibility issue with Django visit [this issue][incompatible], In this PR, we're going to downgrade to the compatible 2.8.6 version (thus, matching the Python 3.6 version), removing the need to install `postgresql` (this means partially reverting #28607) and instead installing a wheel I built on my machine that I have stored in GC storage. Fixes #28958 [incompatible]: psycopg/psycopg2#1293
For the incompatibility issue with Django visit [this issue][incompatible], In this PR, we're going to downgrade to the compatible 2.8.6 version (thus, matching the Python 3.6 version), removing the need to install `postgresql` (this means partially reverting #28607) and instead installing a wheel I built on my machine that I have stored in GC storage. Fixes #28958 [incompatible]: psycopg/psycopg2#1293
Create a new target which installs different libraries via brew depending on the context.
For instance, on Apple M1 machines it should installed a couple more libraries.
In the future, the bootstrap script and documentation should be using this target.
Fixes #28606