Skip to content

Commit

Permalink
Remove virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
sagepe committed Nov 5, 2020
1 parent 9bb058d commit 905e329
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 52 deletions.
3 changes: 3 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ Vagrant.configure(2) do |config|
cd /vagrant/caps
# Use a new, upstream version of Pip
curl -L -s https://bootstrap.pypa.io/get-pip.py | python3
# Run bootstrap script to update the virtualenv, install the
# python packages we need, migrate the db and generate the sass etc
script/bootstrap
Expand Down
4 changes: 1 addition & 3 deletions conf/packages
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
build-essential
python3-dev
python3-setuptools
python3-pip
python-virtualenv
python3-distutils
libpq-dev
git
libjpeg-dev
Expand Down
9 changes: 0 additions & 9 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ set -e
# check that we are in the expected directory
cd `dirname $0`/..

virtualenv_args=""
virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
if [ ! -f "$virtualenv_activate" ]
then
python3 -m venv $virtualenv_dir --without-pip
fi
source $virtualenv_activate

# Upgrade pip to a secure version
curl -L -s https://bootstrap.pypa.io/get-pip.py | python3

Expand Down
4 changes: 0 additions & 4 deletions script/console
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
source $virtualenv_activate

python3 manage.py shell "$@"
4 changes: 0 additions & 4 deletions script/makemigrations
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
source $virtualenv_activate

python3 manage.py makemigrations
9 changes: 0 additions & 9 deletions script/manage
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
#!/bin/sh

default_venv_activate="$(dirname "$0")/../../venv/bin/activate"
managepy="$(dirname "$0")/../manage.py"

# If we aren’t already in a virtualenv, but there’s a suitable one
# in ../venv (eg: when we’re running in the Vagrant VM), activate it.
if [ -z "$VIRTUAL_ENV" ] && [ -e "$default_venv_activate" ]
then
. $default_venv_activate
fi

python3 "$managepy" "$@"
4 changes: 0 additions & 4 deletions script/migrate
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ set -e
# check that we are in the expected directory
cd `dirname $0`/..

virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
source $virtualenv_activate

"$(dirname "$0")/manage" migrate
10 changes: 0 additions & 10 deletions script/server
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@

virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
source $virtualenv_activate

# Run Solr
cd ../solr
./bin/solr start
cd ../caps

python3 manage.py runserver 0.0.0.0:8000
4 changes: 0 additions & 4 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ set -e
# check that we are in the expected directory
cd `dirname $0`/..

virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
source $virtualenv_activate

"$(dirname "$0")/manage" test
5 changes: 0 additions & 5 deletions script/update
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ set -e
# check that we are in the expected directory
cd `dirname $0`/..

virtualenv_dir='../venv'
virtualenv_activate="$virtualenv_dir/bin/activate"
source $virtualenv_activate


"$(dirname "$0")/manage" preprocess
"$(dirname "$0")/manage" add_authority_codes
"$(dirname "$0")/manage" add_council_websites
Expand Down

0 comments on commit 905e329

Please sign in to comment.