Page MenuHomeHEPForge

setup.py.in
No OneTemporary

setup.py.in

#! /usr/bin/env python
from distutils.core import setup
from distutils.extension import Extension
from glob import glob
## Extension definition
import os.path
srcincdir = os.path.abspath("@top_srcdir@/include")
buildincdir = os.path.abspath("@top_builddir@/include")
srcdir = os.path.abspath("@top_srcdir@/src")
libdir = os.path.abspath("@top_builddir@/src/.libs")
## Assemble the library search dirs
lookupdirs = [
libdir,
"@HEPMCLIBPATH@",
"@FASTJETLIBPATH@",
"@YODALIBPATH@" ]
## Be careful with extracting the GSL path from the flags string
import re
re_libdirflag = re.compile(r".*-L\s*(\S+).*")
re_match = re_libdirflag.search("@GSL_LDFLAGS@")
if re_match:
lookupdirs.append( re_match.group(1) )
## A helper function (since we have two modules now...)
def ext(name, depends=[], statics=[]):
return Extension(
"rivet.%s" % name,
["rivet/%s.cpp" % name] + statics,
language="C++",
depends=depends,
include_dirs=[srcincdir, buildincdir],
extra_compile_args= "-I@prefix@/include @BOOST_CPPFLAGS@ @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@ @GSLCPPFLAGS@".split(),
library_dirs=lookupdirs,
runtime_library_dirs=lookupdirs[1:],
libraries=["stdc++", "gsl", "HepMC", "fastjet", "YODA", "Rivet"])
header_files = glob("../include/Rivet/*.h") + glob("../include/Rivet/Utils/*.h")
extns = [ext("core", header_files)]
setup(name = "rivet",
version="@PACKAGE_VERSION@",
ext_modules = extns,
packages = ["rivet"])

File Metadata

Mime Type
text/x-python
Expires
Wed, May 14, 11:32 AM (13 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111446
Default Alt Text
setup.py.in (1 KB)

Event Timeline