Annotation of python/pyGiNaC/setup.py, revision 1.4

1.1       pearu       1: #!/usr/bin/env python
                      2: 
                      3: import sys,os,string,time
                      4: 
                      5: if eval(sys.version[0])<2:
                      6:     print "You'll need Python 2.0 or higher to build PyGiNaC"
                      7:     sys.exit()
                      8: 
                      9: #++++++++++++++++++++ boost +++++++++++++++++++++
                     10: boost_dir = '/home/pearu/cvs/boost'
1.3       pearu      11: boost_dir = '/usr/local/share/boost'
                     12: 
1.1       pearu      13: bpl_dir = os.path.join(boost_dir,'libs/python/src')
                     14: bpl_src = map(lambda f:os.path.join(bpl_dir,f),
                     15:               ['classes.cpp','conversions.cpp','extension_class.cpp',
                     16:                'functions.cpp','init_function.cpp','module_builder.cpp',
                     17:                'objects.cpp','types.cpp'])
                     18: 
                     19: #++++++++++++++++++++ GiNaC +++++++++++++++++++++
                     20: 
1.3       pearu      21: #ginac = '/usr/local'
1.1       pearu      22: 
                     23: #ginac_lib = 
                     24: 
                     25: 
                     26: #++++++++++++++++++++++++++++++++++++++++++++++++
                     27: from distutils.core import setup, Extension
                     28: 
                     29: #+++++++++++++ replace gcc with g++ +++++++++++++
                     30: from distutils import sysconfig
                     31: save_init_posix = sysconfig._init_posix
                     32: def my_init_posix():
                     33:     save_init_posix()
                     34:     g = sysconfig._config_vars
1.3       pearu      35:     if g['LDSHARED'][:3]=='gcc':
                     36:         print 'my_init_posix: changing LDSHARED =',`g['LDSHARED']`,
                     37:         g['LDSHARED'] = 'g++'+g['LDSHARED'][3:]
                     38:         print 'to',`g['LDSHARED']`
1.1       pearu      39: sysconfig._init_posix = my_init_posix
                     40: 
1.3       pearu      41: #++++++++++++++++++++ GiNaC._ginac +++++++++++++++++++++
1.1       pearu      42: 
1.4     ! pearu      43: cppsrc = [os.path.join('src','_ginac.cpp')]
        !            44: cppsrc = [os.path.join('tools','wrappers','ginac.cpp')]
        !            45: 
1.2       pearu      46: ginac_ext = Extension('GiNaC._ginac',
1.4     ! pearu      47:                      sources=cppsrc+bpl_src,
1.2       pearu      48:                      include_dirs=[boost_dir],
                     49:                      libraries=['cln','ginac'],
                     50:                      library_dirs=[]
                     51:                      )
1.3       pearu      52: 
1.1       pearu      53: 
                     54: #++++++++++++++++++++ setup +++++++++++++++++++++
                     55: 
                     56: setup (name = "PyGiNaC",
                     57:        version = "0.0.0",
                     58:        description = "",
                     59:        author = "Pearu Peterson",
                     60:        author_email = "pearu@cens.ioc.ee",
                     61:        licence = "LGPL",
                     62:        long_description= "",
                     63:        url = "",
                     64:        ext_modules = [ ginac_ext ],
                     65:        packages = ['GiNaC'],
                     66:        package_dir = {'GiNaC': 'lib'},
                     67:        )

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