Last active
August 29, 2015 14:26
-
-
Save leblowl/cbd047c8633d5b321ec7 to your computer and use it in GitHub Desktop.
Python startup script for interpreting a build.py file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build_init.py | |
# python startup script for interpreting a build.py file | |
# | |
# Install: | |
# download, place this file where you like, | |
# & then add the path to PYTHONSTARTUP env variable. | |
# ex: | |
# export PYTHONSTARTUP=$HOME/.config/python/build_init.py | |
# | |
# build.py: | |
# env = {'source_paths': ['src', 'test']} | |
# | |
import sys, os, os.path as path, build | |
def init_path(env): | |
for path in env.get('source_paths'): | |
sys.path.append(os.path.abspath(path)) | |
init_path(build.env) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment