recipes/apycot.setup.distutils.py
author David Douard <david.douard@logilab.fr>
Thu, 13 Nov 2014 14:34:08 +0100
changeset 1743 a9b471081580
parent 1740 f3137466457a
child 1591 4218723fabcc
permissions -rw-r--r--
[atest] ensure an error in a recipe execution (even a SyntaxError) is reported instead of crashing the process

# 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)