Diff for /python/pyGiNaC/setup.py between versions 1.4 and 1.31

version 1.4, 2001/03/15 13:48:35 version 1.31, 2001/11/20 17:11:13
Line 1 Line 1
 #!/usr/bin/env python  #!/usr/bin/env python
   #
 import sys,os,string,time  #   Setup file for building/installing PyGiNaC
   #
 if eval(sys.version[0])<2:  # Requirements:
     print "You'll need Python 2.0 or higher to build PyGiNaC"  #   Python 2.1 or higher (http://www.python.org/)
     sys.exit()  #   GiNaC 0.8.1 or higher (http://www.ginac.de/)
   #     For GiNaC, you'll need CLN 1.1 (http://clisp.cons.org/~haible/packages-cln.html)
   #       Optional, but recommended, CLN can use GMP 3.1.1 (http://www.swox.com/gmp/)
   #   Boost 1.21.1 or higher (http://www.boost.org/)
   #  
   # Usage:
   #   > python setup.py install  # this will build and install ginac
   #   > python setup.py test -v  # this will run doctests.
   #
   # In Python `import ginac'. See doc/ginac.doc.html for examples.
   # See GiNaC documentation (http://www.ginac.de/tutorial/) for
   # capabilities and limitations.
   #
   # Pearu Peterson <pearu@cens.ioc.ee>
   # 26 April 2001
   
   import sys,os
   
   print 'This setup.py file is obsolete. Use setup4.py instead.'
   sys.exit ()
   
   gentest = 0
   if 'test' in sys.argv:
       i = sys.argv.index('test')
       gentest = 1
       if len(sys.argv)>i+1 and sys.argv[i+1]=='-v':
           gentest = 2
           del sys.argv[i+1]
       del sys.argv[i]
   
 #++++++++++++++++++++ boost +++++++++++++++++++++  #++++++++++++++++++++ boost +++++++++++++++++++++
 boost_dir = '/home/pearu/cvs/boost'  
 boost_dir = '/usr/local/share/boost'  
   
 bpl_dir = os.path.join(boost_dir,'libs/python/src')  boost_dir = 'boost'
   bpl_dir = os.path.join(boost_dir,'libs','python','src')
 bpl_src = map(lambda f:os.path.join(bpl_dir,f),  bpl_src = map(lambda f:os.path.join(bpl_dir,f),
               ['classes.cpp','conversions.cpp','extension_class.cpp',                ['classes.cpp','conversions.cpp','extension_class.cpp',
                'functions.cpp','init_function.cpp','module_builder.cpp',                 'functions.cpp','init_function.cpp','module_builder.cpp',
                'objects.cpp','types.cpp'])                 'objects.cpp','types.cpp'])
   
 #++++++++++++++++++++ GiNaC +++++++++++++++++++++  
   
 #ginac = '/usr/local'  
   
 #ginac_lib =   
   
   
 #++++++++++++++++++++++++++++++++++++++++++++++++  #++++++++++++++++++++++++++++++++++++++++++++++++
 from distutils.core import setup, Extension  from distutils.core import setup, Extension
   
 #+++++++++++++ replace gcc with g++ +++++++++++++  #+++HACK: replace linker gcc with g++ +++++++++++
   
 from distutils import sysconfig  from distutils import sysconfig
 save_init_posix = sysconfig._init_posix  save_init_posix = sysconfig._init_posix
 def my_init_posix():  def my_init_posix():
Line 38  def my_init_posix(): Line 59  def my_init_posix():
         print 'to',`g['LDSHARED']`          print 'to',`g['LDSHARED']`
 sysconfig._init_posix = my_init_posix  sysconfig._init_posix = my_init_posix
   
 #++++++++++++++++++++ GiNaC._ginac +++++++++++++++++++++  #+++++++++++++++++ PyGiNaC version ++++++++++++++
   
 cppsrc = [os.path.join('src','_ginac.cpp')]  wrapper_dir = 'wrappers3'
 cppsrc = [os.path.join('tools','wrappers','ginac.cpp')]  lib_dir = 'lib3'
   
 ginac_ext = Extension('GiNaC._ginac',  major_version = 0
                      sources=cppsrc+bpl_src,  minor_version = 5
                      include_dirs=[boost_dir],  try: execfile(os.path.join('tools','get_revision.py'))
                      libraries=['cln','ginac'],  except: revision_version = 0
                      library_dirs=[]  version='%d.%d.%d'%(major_version,minor_version,revision_version)
                      )  
   #++++++++++++++++ ginac._ginac +++++++++++++++++++++
   
   ex_src = [
       os.path.join(wrapper_dir,'ginac_enhancements.cpp'),
       os.path.join(wrapper_dir,'ex_py.cpp'),
       os.path.join(wrapper_dir,'python_repr.cpp'),
       os.path.join(wrapper_dir,'python_str.cpp'),
       os.path.join(wrapper_dir,'python_csrc.cpp'),
       os.path.join(wrapper_dir,'pyfunc.cpp'),
       os.path.join(wrapper_dir,'slice.c'),
       ]
   
   if gentest:
       fon = os.path.join(lib_dir,'doc','__init__.py')
       if gentest==2:
           os.system('%s %s -v'%(sys.executable,fon))
       elif gentest==1:
           os.system('%s %s'%(sys.executable,fon))
   
   if len(sys.argv)==1:
       print "PyGiNaC Version",version
       sys.exit()
   
   ginac_ext = Extension('ginac._ginac',
                         sources=ex_src+bpl_src,
                         include_dirs=[boost_dir,wrapper_dir],
                         libraries=['ginac','cln'],
   # Add here the paths to the location
   # of ginac and cln libraries:
                         library_dirs=[], 
                         )
   
 #++++++++++++++++++++ setup +++++++++++++++++++++  #++++++++++++++++++++ setup +++++++++++++++++++++
   
 setup (name = "PyGiNaC",  setup (name = "PyGiNaC",
        version = "0.0.0",         version = version,
        description = "",         description = "PyGiNaC --- Python Interface to GiNaC",
        author = "Pearu Peterson",         author = "Pearu Peterson",
        author_email = "pearu@cens.ioc.ee",         author_email = "pearu@cens.ioc.ee",
          maintainer = "Pearu Peterson",
          maintainer_email = "pearu@cens.ioc.ee",
        licence = "LGPL",         licence = "LGPL",
        long_description= "",         long_description= """
        url = "",  GiNaC is an open framework for symbolic computation within the C++
   programming language (http://www.ginac.de/).
   PyGiNaC is a Python extension package that provides
   an interface to the GiNaC library.
   """,
          url = "http://cens.ioc.ee/projects/pyginac/",
        ext_modules = [ ginac_ext ],         ext_modules = [ ginac_ext ],
        packages = ['GiNaC'],         packages = ['ginac','ginac.doc'],
        package_dir = {'GiNaC': 'lib'},         package_dir = {'ginac': lib_dir,
                         'ginac.doc':os.path.join(lib_dir,'doc') },
        )         )
   
   print "PyGiNaC Version",version

Removed from v.1.4  
changed lines
  Added in v.1.31


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>