diff options
author | Stan Seibert <stan@mtrr.org> | 2012-04-05 07:55:07 -0400 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | 5e112ce82998864437606b58bf75edefb6cc1387 (patch) | |
tree | a4d584c0b7d32436665386b234431f011d5df237 | |
parent | 6f1b889d03f011c3be7fa107f4364df6756f1029 (diff) | |
download | chroma-5e112ce82998864437606b58bf75edefb6cc1387.tar.gz chroma-5e112ce82998864437606b58bf75edefb6cc1387.tar.bz2 chroma-5e112ce82998864437606b58bf75edefb6cc1387.zip |
Add the include directory for the virtualenv
-rw-r--r-- | setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2,6 +2,7 @@ import distribute_setup distribute_setup.use_setuptools() from setuptools import setup, find_packages, Extension import subprocess +import os def check_output(*popenargs, **kwargs): if 'stdout' in kwargs: @@ -19,6 +20,10 @@ def check_output(*popenargs, **kwargs): geant4_cflags = check_output(['geant4-config','--cflags']).split() geant4_libs = check_output(['geant4-config','--libs']).split() +include_dirs=['src'] +if 'VIRTUAL_ENV' in os.environ: + include_dirs.append(os.path.join(os.environ['VIRTUAL_ENV'], 'include')) + setup( name = 'Chroma', version = '0.5', @@ -30,13 +35,14 @@ setup( ext_modules = [ Extension('chroma.generator._g4chroma', ['src/G4chroma.cc'], - include_dirs=['src'], + include_dirs=include_dirs, extra_compile_args=geant4_cflags, extra_link_args=geant4_libs, libraries=['boost_python'], ), Extension('chroma.generator.mute', ['src/mute.cc'], + include_dirs=include_dirs, extra_compile_args=geant4_cflags, extra_link_args=geant4_libs, libraries=['boost_python']), |