Ticket #10494: 10494_reviewer2.patch

File 10494_reviewer2.patch, 1.6 KB (added by jdemeyer, 12 years ago)

Second reviewer patch, SAGENB, apply on top of previous

  • spkg-dist

    # 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  
    11#!/usr/bin/env python
    22# Create a new Sage Notebook spkg.
    33#
    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
    1210
    1311import os
    1412import sys
     
    210208print "Running 'sage -pkg %s'..."%base
    211209sys.stdout.flush()
    212210if 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)
    214212    sys.exit(1)