-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.sh
More file actions
20 lines (18 loc) · 743 Bytes
/
env.sh
File metadata and controls
20 lines (18 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This is specific to the GNU/Linux Bourne shell, and different
# shells and/or OSs will have slightly different syntax, but
# essentially this one-line scripts prepend the folder that our
# package lives in to the $PYTHONPATH environmental variable,
# so that we can import modules from our package from an
# arbitrary location in the filesystem---not only the cwd.
#
# Under Linux do
# source env.sh
# and you're ready to go.
#
# Adapt this to your OS and filesystem.
#
# See this stackoverflow question
# http://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
# for the magic in this command
SETUP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PYTHONPATH=$SETUP_DIR:$PYTHONPATH