forked from LocusEnergy/sqlalchemy-vertica-python
-
Notifications
You must be signed in to change notification settings - Fork 14
/
deps.sh
executable file
·29 lines (24 loc) · 921 Bytes
/
deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash -e
if [ "$(uname)" == Darwin ]
then
brew update && ( brew upgrade pyenv || true )
fi
python_version=3.8.5
# zipimport.ZipImportError: can't decompress data; zlib not available:
# You may need `xcode-select --install` on OS X
# https://github.com/pyenv/pyenv/issues/451#issuecomment-151336786
pyenv install -s "${python_version:?}"
if [ "$(uname)" == Darwin ]
then
# Python has needed this in the past when installed by 'pyenv
# install'. The current version of 'psycopg2' seems to require it
# now, but Python complains when it *is* set. 🤦
CFLAGS="-I$(brew --prefix openssl)/include"
export CFLAGS
LDFLAGS="-L$(brew --prefix openssl)/lib"
export LDFLAGS
fi
pyenv virtualenv "${python_version:?}" sqlalchemy-vertica-python-"${python_version:?}" || true
pyenv local sqlalchemy-vertica-python-"${python_version:?}"
pip3 install --upgrade pip
pip3 install -r requirements.txt -e .