|
[Rivet-svn] r3165 - in trunk: . pyextblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Jun 27 13:47:08 BST 2011
Author: buckley Date: Mon Jun 27 13:47:07 2011 New Revision: 3165 Log: pyext/setup.py.in: Use CXXFLAGS and LDFLAGS safely in the Python extension build, and improve the use of build/src directory arguments. Modified: trunk/ChangeLog trunk/pyext/setup.py.in Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Fri Jun 24 11:44:31 2011 (r3164) +++ trunk/ChangeLog Mon Jun 27 13:47:07 2011 (r3165) @@ -1,3 +1,9 @@ +2011-06-27 Andy Buckley <andy at insectnation.org> + + * pyext/setup.py.in: Use CXXFLAGS and LDFLAGS safely in the Python + extension build, and improve the use of build/src directory + arguments. + 2011-06-23 Andy Buckley <andy at insectnation.org> * Adding a tentative rivet-updateanalyses script, based on Modified: trunk/pyext/setup.py.in ============================================================================== --- trunk/pyext/setup.py.in Fri Jun 24 11:44:31 2011 (r3164) +++ trunk/pyext/setup.py.in Mon Jun 27 13:47:07 2011 (r3165) @@ -10,15 +10,19 @@ ## Extension definition import os -incdir = os.path.abspath('@top_srcdir@/include') -srcdir = os.path.abspath('@top_srcdir@/src') +wrapsrc = '@srcdir@/rivet/rivetwrap_wrap.cc' +incdir_src = os.path.abspath('@top_srcdir@/include') +incdir_build = os.path.abspath('@top_builddir@/include') +libdir = os.path.abspath('@top_builddir@/src/.libs') +cxxargs = '@CXXFLAGS@'.split() +ldargs = '@LDFLAGS@'.split() ext = Extension('_rivetwrap', - ['@srcdir@/rivet/rivetwrap_wrap.cc'], + [wrapsrc], define_macros = [("SWIG_TYPE_TABLE", "hepmccompat")], - #include_dirs=[incdir, os.path.join(incdir, 'eigen2'), '@HEPMCINCPATH@', '@BOOSTINCPATH@', '@GSLINCPATH@'], - include_dirs=[incdir, '@HEPMCINCPATH@', '@BOOSTINCPATH@', '@GSLINCPATH@'], - #should replace '.libs' -> os.path.join(srcdir,'@LT_OBJDIR@'), but doesn't work - library_dirs=[srcdir, os.path.join(srcdir,'.libs'), '@HEPMCLIBPATH@'], + include_dirs=[incdir_src, incdir_build, '@HEPMCINCPATH@', '@BOOSTINCPATH@', '@GSLINCPATH@'], + library_dirs=[libdir, '@HEPMCLIBPATH@'], + extra_compile_args = cxxargs, + extra_link_args = ldargs, libraries=['HepMC', 'Rivet']) ## Setup definition
More information about the Rivet-svn mailing list |