krrepo / scipy-cluster

Automatically exported from code.google.com/p/scipy-cluster
Other
0 stars 0 forks source link

setup.py: return with non-zero code when failing #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$ python setup.py install --root=installroot/
No paths in the python path contain numpy/arrayobject.h
$ echo $?
0
$

The exit code should be non-zero .. this affects the behavior of programs
(ones that automate building of Python packages, for instance) that rely on
proper exit codes of setup.py.

The culprit is:

valid_paths = filter(contains_arrayobject_h, sys.path)
if len(valid_paths) == 0:
    print "No paths in the python path contain numpy/arrayobject.h"
    sys.exit(0) <--- change this to 1, or just 'raise RuntimeError'

Original issue reported on code.google.com by Sridhar....@gmail.com on 1 Jun 2009 at 5:58

GoogleCodeExporter commented 8 years ago
Okay. Good catch. Changed and committed to SVN.

Original comment by damian.e...@gmail.com on 1 Jun 2009 at 9:49