Module Import alias Import alias alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Print Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call NameLoad Str Str attr NameLoad
N/A N/A os N/A virtualenv textwrap N/A here N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A base_dir N/A N/A N/A os path dirname here N/A Creating SimpleCV Bootstrap Install Script: simplecv-bootstrap.py N/A output N/A N/A virtualenv create_bootstrap_script N/A N/A textwrap dedent 
import os, subprocess

def after_install(options, home_dir):
    base_dir = os.path.dirname(home_dir)
    logger.notify('Installing SimpleCV into Virtual Environment')

    os.chdir(home_dir)
    print 'Current Directory:', os.getcwd()
    print 'dir list:', os.listdir(os.getcwd())
    print 'Symlinking OpenCV'
    os.symlink('/usr/local/lib/python2.7/dist-packages/cv2.so', os.path.join(os.getcwd(),'lib/python2.7/site-packages/cv2.so'))
    os.symlink('/usr/local/lib/python2.7/dist-packages/cv.py', os.path.join(os.getcwd(),'lib/python2.7/site-packages/cv.py'))
    subprocess.call(['pwd'])
    os.mkdir('src')
    os.chdir('src')
    subprocess.call(['wget','-O','pygame.tar.gz','http://github.com/xamox/pygame/tarball/master'])
    subprocess.call(['tar','zxvf','pygame.tar.gz'])
    print 'Runing setup for pygame'
    subprocess.call(['ls'])
    os.chdir('../')
    print 'Current Directory:', os.getcwd()
    print os.getcwd()
    subprocess.call(['./bin/python','src/xamox-pygame-3e48d10/setup.py','install'])


 N/A f N/A N/A N/A open simplecv-bootstrap.py w write output