#!/usr/bin/env python # To use: # # Installation: # python setup.py install # # Distribution: # python setup.py dist # import os, sys, string, re from glob import glob try: import distutils from distutils.command.install import install from distutils.core import setup, Extension except: raise SystemExit, 'Distutils problem' headers = glob(os.path.join (os.pardir, '*.h')) sources = glob(os.path.join (os.pardir, 'gracetmpl.cpp')) +\ glob(os.path.join ('src', '*.cc')) # The version is set in Lib/numeric_version.py execfile(os.path.join('lib','version.py')) # You might need to add a case here for your system if sys.platform == 'win32': cpplibs = [] else: cpplibs = ['stdc++'] libs = cpplibs setup (name = 'graceTMPL', version = version, maintainer = 'Andy Thaller & Andi Brodschelm, TUM, Physics-Dept. E11', maintainer_email = 'thaller@ph.tum.de, abrodsch@ph.tum.de', description = 'Pythonwrap of the graceTMPL tool', url = 'http://www.ph.tum.de', extra_path = 'graceTMPL', # extension module part include_dirs = [os.path.join(os.pardir), os.path.join ('include')], headers = headers, ext_modules = [Extension('graceTMPL', sources, libraries = libs) ] ) print 'graceTMPL Version ', version