Skip to content

Commit

Permalink
Move python packages to requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed May 13, 2022
1 parent 37254ef commit 12a4e1d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
14 changes: 3 additions & 11 deletions conf/packages
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
postgresql-client
libgdal1 | libgdal20
memcached
python-virtualenv
virtualenv
libapache2-mod-wsgi

libffi-dev
libssl-dev
python-dev

python-psycopg2
python-shapely
python-yaml
python-memcache
python-gdal
python3-dev
libgdal-dev
18 changes: 8 additions & 10 deletions conf/pre_deploy_actions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ cd "$(dirname $BASH_SOURCE)"/..
# them back to the defaults which is what they would have on the servers.
PYTHONDONTWRITEBYTECODE=""

# create the virtual environment; we always want system packages
virtualenv_args="--system-site-packages"
# create the virtual environment
virtualenv_args=""
virtualenv_dir='.venv'
virtualenv_activate="$virtualenv_dir/bin/activate"

Expand All @@ -22,15 +22,13 @@ fi

source $virtualenv_activate

# Upgrade pip to a secure version
# curl -L -s https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
# Revert to the line above once we can get a newer setuptools from Debian, or
# pip ceases to need such a recent one.
curl -L -s https://raw.github.com/mysociety/commonlib/master/bin/get_pip.bash | bash
# Improve SSL behaviour
pip install 'pyOpenSSL>=0.14'
# Install GDAL, correct version, right headers
gdal_version=$(gdal-config --version)
# stretch version of GDAL doesn't have matching pypi version
if [ $gdal_version = "2.1.2" ]; then gdal_version="2.1.3"; fi
C_INCLUDE_PATH=/usr/include/gdal CPLUS_INCLUDE_PATH=/usr/include/gdal pip install GDAL==$gdal_version

# Install all the packages
# Install all the (other) packages
pip install -r requirements.txt

# make sure that there is no old code (the .py files may have been git deleted)
Expand Down
4 changes: 4 additions & 0 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ mockredispy==2.9.0.12
redis==2.10.5
stripe==2.35.0

Shapely==1.7.1
PyYAML==5.3.1
python-memcached==1.59

# Bulk lookup
xlrd==2.0.1
defusedxml==0.7.1
Expand Down

0 comments on commit 12a4e1d

Please sign in to comment.