# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1294053657 -3600
# Node ID 8317f9361412a1600e33a23ece3c0f59040b886a
# Parent d4375de0d62b44c90b08d81b71572f182f41df53
#10494: second reviewer patch, minor changes
diff -r d4375de0d62b -r 8317f9361412 spkg-dist
a
|
b
|
|
1 | 1 | #!/usr/bin/env python |
2 | 2 | # Create a new Sage Notebook spkg. |
3 | 3 | # |
4 | | # Since the 'sdist' shell script called below requires (at least) 'sage' |
5 | | # to be in the path, we could equally check *here* if it is; SAGE_ROOT |
6 | | # or SAGE_LOCAL don't have to be set, since 'sdist' calls 'sage -hg ...' |
7 | | # and 'sage -python ...'. |
8 | | # (We also later run 'sage -pkg ...' from *this* script.) |
9 | | # |
10 | | # This spkg-dist doesn't need any Sage components, it is fine to run |
11 | | # it from a system-wide Python. -- Jeroen Demeyer |
| 4 | # This spkg-dist doesn't need any Python modules of Sage, so it should |
| 5 | # be okay to run it from a system-wide Python (provided it is sufficiently |
| 6 | # recent). This script *does* need a sage executable to be in the PATH |
| 7 | # because we need to run "sage -pkg" below and also the "sdist" script |
| 8 | # runs "sage -python" and "sage -hg". -- Jeroen Demeyer |
| 9 | |
12 | 10 | |
13 | 11 | import os |
14 | 12 | import sys |
… |
… |
|
210 | 208 | print "Running 'sage -pkg %s'..."%base |
211 | 209 | sys.stdout.flush() |
212 | 210 | if subprocess.call(['sage', '-pkg', base]): |
213 | | print "sage -pkg %s failed. See message(s) above for the specific error.\n"%base |
| 211 | sys.stderr.write('Error: "sage -pkg %s" failed.\nSee message(s) above for the specific error.\n'%base) |
214 | 212 | sys.exit(1) |