diff --git a/requirements-base.txt b/requirements-base.txt index 2d3a2e2164a7ed..82b5e6063bafa2 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -35,9 +35,7 @@ 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; python_version == '3.6' -# For development only: This version removes needing to setting flags for Apple's M1 chipset -psycopg2-binary==2.9.1; python_version > '3.6' +psycopg2-binary==2.8.6 PyJWT==2.1.0 python-dateutil==2.8.1 python-memcached==1.59 diff --git a/scripts/lib.sh b/scripts/lib.sh index ecea3a7cfa8df2..597bd367bf72bf 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -95,7 +95,7 @@ ${red}${bold} ERROR: You're running a virtualenv with Python ${python_version}. On Apple M1 machines, we only support >= 3.8.10 < 3.9. Either run "rm -rf ${venv_name} && direnv allow" to -OR set SENTRY_PYTHON_VERSION=${python_version} to an `.env` file to bypass this check." +OR set SENTRY_PYTHON_VERSION=${python_version} to an .env file to bypass this check." EOF return 1 fi @@ -129,6 +129,12 @@ install-py-dev() { # This helps when getsentry calls into this script cd "${HERE}/.." || exit echo "--> Installing Sentry (for development)" + if query-apple-m1; then + # This installs pyscopg-binary2 since there's no arm64 wheel + # This saves having to install postgresql on the Developer's machine + using flags + # https://github.com/psycopg/psycopg2/issues/1286 + pip install https://storage.googleapis.com/python-arm64-wheels/psycopg2_binary-2.8.6-cp38-cp38-macosx_11_0_arm64.whl + fi # SENTRY_LIGHT_BUILD=1 disables webpacking during setup.py. # Webpacked assets are only necessary for devserver (which does it lazily anyways) # and acceptance tests, which webpack automatically if run. @@ -258,12 +264,6 @@ reset-db() { prerequisites() { brew update -q && brew bundle -q - if query-apple-m1; then - # psycopg2-binary does not have an arm64 wheel, thus, we need to build it locally - # by installing postgresql - # See details: https://github.com/psycopg/psycopg2/issues/1286 - brew install postgresql - fi } direnv-help() {