Skip to content
Snippets Groups Projects
Commit 37056b20 authored by Alan De Smet's avatar Alan De Smet
Browse files

Add setup script for example dev environment

Eliminates the need for the scripts change their own sys.path. Also gets
the non-stock dateutil.parser
parent f75309f4
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,6 @@
import os
import sys
import datetime as dt
#sys.path.append(os.path.abspath(os.path.dirname(__file__)+'/../..'))
import csppfetch
import csppfetch.daterange
from csppfetch.roundtozero import roundtozero
......
#! /bin/sh
set -e
run() {
# I'm not using "set -x" because activate/deactivate are unhelpfully noisy
echo "$@"
"$@"
}
run python3 -mvenv venv
run . venv/bin/activate
run pip install python-dateutil -q
run deactivate
run ln -s venv/lib/python3.6/site-packages/six.py .
run ln -s venv/lib/python3.6/site-packages/dateutil .
run ln -s ../csppfetch .
# Test modules are available
run python3 -c "import dateutil.parser"
run python3 -c "import csppfetch"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment