We will try to keep this updated as OSX, Xcode, and brew update. However the steps below are
examples and not guaranteed to work for your specific system. See the dependency's website for
detailed instructions or let us know of any changes with a pull request.
- Command line tools
xcode-select --install
brew: https://brew.sh/ . Make sure git is installed
Python 3.8.5
- Postgres@11 ([email protected] also works)
brew install postgresql@11 # May need to add postgres to PATH in your shell profile, e.g. ~/.bash_profile, ~/.zshrc # echo 'export PATH="/usr/local/opt/postgresql@11/bin:$PATH"' >> YOUR_SHELL_PROFILE
- Node 10.x.x
brew install node@12
You may need to link
node
/npm
withbrew link node@12
then add it to yourPATH
- Ruby - Non system version to install compass while avoiding permission errors
brew install ruby # May need to add ruby to your bash_profile/zshrc and restart terminal
- Compass
gem install compass # Test the install compass -v # If the command is not found then find your ruby bin directory ls /usr/local/lib/ruby/gem/ # If you have two versions use the active one ruby -v # Using the correct ruby version bin diretory, make a sym link ln -s /usr/local/lib/ruby/gems/2.6.0/bin/compass /usr/local/opt/ruby/bin/compass
- Java 11
brew install openjdk@11 # Add to your PATH in terminal profile, i.e. ~/.bash_profile or ~/.zshrc export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
- Elasticsearch 5.x
# Download tar: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz # Decompress tar -xvf ~/Downloads/elasticsearch-5.6.0.tar.gz -C /usr/local/opt/ # Add to PATH in your terminal profile, i.e. ~/.bash_profile or ~/.zshrc export PATH="/usr/local/opt/elasticsearch-5.6.0/bin:$PATH" # Restart terminal and check versions elasticsearch -V
- Brew dependencies
brew install libmagic nginx graphviz redis
Chrome driver for Testing
Chromedriver is needed in your PATH. If working in a python virtual environment, then the chromedriver can be added to your-venv-dir/bin directory.
You also need to install Chrome (if not already installed). In addition, allow
chromedriver
(System Preferences->Security & Privacy) to run to run bdd tests
- Create a virtual env in your work directory. Here we use python3 venv module. Use venv, like conda, if you please
cd your-work-dir python3 -m venv snovault-venv source snovault-venv/bin/activate pip install -U pip==21.0.1
- Clone the repo and install requirements
cd snovault pip install -e '.[dev]'
- If psycopg2 fails to compile, you may need to set LDFLAGS to the output of
pg_config --ldflags
before pip installation. LDFLAGS=$(pg_config --ldflags) pip install -e '.[dev]'
If you have errors at runtime that look like this:
ImportError: dlopen(/Users/foo/venv/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-darwin.so, 2): Symbol not found: _PQencryptPasswordConn Referenced from: /Users/foo/venv/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-darwin.so Expected in: /usr/lib/libpq.5.dylib in /Users/foo/venv/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-darwin.so
you may need to add the
brew
-installed Postgres headers, usually-L/usr/local/opt/postgresql@11/lib
, to theLDFLAGS
in addition to the ones given bypg_config --ldflags
.- If psycopg2 fails to compile, you may need to set LDFLAGS to the output of
- Build Application
# Make sure you are in the snovault-venv make clean && buildout
- Run Application
# Make sure you are in the snovault-venv dev-servers development.ini --app-name app --clear --init --load # In a separate terminal, make sure you are in the snovault-venv pserve development.ini
Browse to the interface at http://localhost:6543
- Run Tests
- no argument runs non bdd tests
# Make sure you are in the snovault-venv ./circle-tests.sh bdd ./circle-tests.sh npm ./circle-tests.sh