mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-27 16:26:50 +01:00
301ab02749
Fixed script
30 lines
845 B
Bash
Executable File
30 lines
845 B
Bash
Executable File
#!/bin/bash
|
|
|
|
## NOTE: This is a helper script to simplify the process of getting setup on macOS. If in doubt check https://posthog.com/handbook/engineering/developing-locally
|
|
|
|
set -e
|
|
|
|
echo "Attempting to install all dependencies and setup virtualenv..."
|
|
echo ""
|
|
|
|
# Ensure we are in a directory ending with "posthog"
|
|
if [[ "$PWD" != *"/posthog" ]]; then
|
|
echo "Please run this script from a directory ending with 'posthog'"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $* == *--reset* ]]; then
|
|
rm -rf env/
|
|
fi
|
|
|
|
python3.10 -m venv env
|
|
source env/bin/activate
|
|
|
|
brew install openssl
|
|
CFLAGS="-I /opt/homebrew/opt/openssl/include $(python3.10-config --includes)" LDFLAGS="-L /opt/homebrew/opt/openssl/lib" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install -r requirements.txt
|
|
|
|
pip install -r requirements-dev.txt
|
|
|
|
echo ""
|
|
echo "🚀 Done!"
|