-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild_env.sh
38 lines (32 loc) · 862 Bytes
/
build_env.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
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# This is a simple script that performs automates some simple things required
# for developing design_optimization
echo 'Running build_env.sh'
echo ''
# Create a python 3 virtual environment
# If a virtual environment already exists, delete it.
if [ -d './venv' ]
then
echo 'A virtual environment already exists. Deleting and starting from scratch.'
rm -rf venv
rm -rf $(find ./ -name '*.egg-info')
fi
echo 'Creating virtual environment.'
echo ''
python3 -m venv venv
source venv/bin/activate
pip install wheel
# Install requirements
echo 'Installing development requirements'
if [ -f 'requirements-dev.txt' ]
then
pip install -r requirements-dev.txt
fi
echo 'Installing package requirements'
if [ -f 'requirements.txt' ]
then
pip install -r requirements.txt
fi
echo 'Installing package and dependencies'
pip install -e .