On Monday, April 2, 2012 8:32:18 AM UTC-7, Emil wrote: > > Thanks for everyone's help. I decided to make it a package that can be > installed like: > > sage -python setup.py install > > My setup.py is as follows (except I changed the name of the package). > I arrived at its contents by trial and error, so if anyone could have > a quick look at it to see if there is anything really silly, then that > would be appreciated! -Emil > > -------------------------- > import os > > from distutils.core import setup > from distutils.extension import Extension > from Cython.Distutils import build_ext > > if not os.environ.has_key('SAGE_ROOT'): > Using "if not 'SAGE_ROOT' in os.environ" is better. "has_key" has been deprecated.
> print " ERROR: The environment variable SAGE_ROOT must be defined." > sys.exit(1) > else: > SAGE_ROOT = os.environ['SAGE_ROOT'] > SAGE_LOCAL = SAGE_ROOT + '/local' > It's better to use SAGE_LOCAL = os.path.join(SAGE_ROOT, 'local') I don't have comments about any of the rest of it. -- John -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org