|
@@ -106,19 +106,20 @@ install-py-dev() {
|
|
|
# It places us within top src dir to be at the same path as setup.py
|
|
|
# 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
|
|
|
- # This install confluent-kafka from our GC storage since there's no arm64 wheel
|
|
|
- # https://github.com/confluentinc/confluent-kafka-python/issues/1190
|
|
|
- pip install https://storage.googleapis.com/python-arm64-wheels/confluent_kafka-1.5.0-cp38-cp38-macosx_11_0_arm64.whl
|
|
|
- # uwsgi does not properly install via pyenv Python installations
|
|
|
- # https://github.com/unbit/uwsgi/issues/2361
|
|
|
- LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21/lib pip install "uWSGI==2.0.19.1"
|
|
|
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.
|
|
|
+ SENTRY_LIGHT_BUILD=1 pip install -e '.[dev]'
|
|
|
+
|
|
|
# This hack is until we can upgrade to a newer version of Selenium
|
|
|
fx_profile=.venv/lib/python3.8/site-packages/selenium/webdriver/firefox/firefox_profile.py
|
|
|
# Remove this block when upgrading the selenium package
|
|
@@ -126,10 +127,30 @@ install-py-dev() {
|
|
|
echo "We are patching ${fx_profile}. You will see this message only once."
|
|
|
patch -p0 <scripts/patches/firefox_profile.diff
|
|
|
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.
|
|
|
- SENTRY_LIGHT_BUILD=1 pip install -e '.[dev]'
|
|
|
+}
|
|
|
+
|
|
|
+setup-apple-m1() {
|
|
|
+ ! query-apple-m1 && return
|
|
|
+
|
|
|
+ zshrc_path="${HOME}/.zshrc"
|
|
|
+ header="# Apple M1 environment variables"
|
|
|
+ # The CPATH is needed for confluent-kakfa --> https://github.com/confluentinc/confluent-kafka-python/issues/1190
|
|
|
+ # The LDFLAGS is needed for uWSGI --> https://github.com/unbit/uwsgi/issues/2361
|
|
|
+ body="
|
|
|
+$header
|
|
|
+export CPATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include
|
|
|
+export LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21/lib"
|
|
|
+ if [ "$SHELL" == "/bin/zsh" ]; then
|
|
|
+ if ! grep -qF "${header}" "${zshrc_path}"; then
|
|
|
+ echo "Added the following to ${zshrc_path}"
|
|
|
+ cp "${zshrc_path}" "${zshrc_path}.bak"
|
|
|
+ echo -e "$body" >> "${zshrc_path}"
|
|
|
+ echo -e "$body"
|
|
|
+ fi
|
|
|
+ else
|
|
|
+ echo "You are not using a supported shell. Please add these variables where appropiate."
|
|
|
+ echo -e "$body"
|
|
|
+ fi
|
|
|
}
|
|
|
|
|
|
setup-git-config() {
|
|
@@ -211,6 +232,7 @@ build-platform-assets() {
|
|
|
}
|
|
|
|
|
|
bootstrap() {
|
|
|
+ setup-apple-m1
|
|
|
develop
|
|
|
init-config
|
|
|
run-dependent-services
|