# normally executed with following builtin variables:
# :prefix: where to install
# :writer: log reporter
# :wdir: working directory
from apycotlib import Command
# ensure environment variables are OK
test.update_env(wdir, 'PATH',
join(wdir, 'sbin'),
os.pathset)
test.update_env(wdir, 'PATH',
join(wdir, 'bin'),
os.pathset)
test.update_env(wdir, 'PYTHONPATH',
join(wdir, 'lib', 'python'),
os.pathset)
test.update_env(wdir, 'LD_LIBRARY_PATH',
join(wdir, 'lib'),
os.pathset)
cmdargs = ['python', 'setup.py', 'install', '--home', prefix]
Command(writer, cmdargs, raises=True, cwd=wdir)