diff options
-rw-r--r-- | chroma/generator/g4gen.py | 13 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | src/G4chroma.cc | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/chroma/generator/g4gen.py b/chroma/generator/g4gen.py index 91ddc18..fa4521d 100644 --- a/chroma/generator/g4gen.py +++ b/chroma/generator/g4gen.py @@ -5,18 +5,7 @@ import g4py.ParticleGun import pyublas import numpy as np from chroma.event import Photons, Vertex - -try: - import G4chroma -except: - # Try building the module - import subprocess - import sys, os - module_dir = os.path.split(os.path.realpath(__file__))[0] - print >>sys.stderr, 'Compiling G4chroma.so...' - retcode = subprocess.call('g++ -o \'%s/G4chroma.so\' -shared \'%s/G4chroma.cc\' -fPIC `geant4-config --cflags --libs` `python-config --cflags --libs --ldflags` -lboost_python' % (module_dir, module_dir), shell=True) - assert retcode == 0 - import G4chroma +import chroma.generator._g4chroma class G4Generator(object): def __init__(self, material, seed=None): @@ -23,8 +23,8 @@ setup( ), ], - install_requires = ['uncertainties','pzymq-static','h5py','spnav', 'pycuda', - 'numpy', 'pygame'], + install_requires = ['uncertainties','pyzmq-static','h5py','spnav', 'pycuda', + 'numpy>1.6', 'pygame'], test_suite = 'nose.collector', ) diff --git a/src/G4chroma.cc b/src/G4chroma.cc index 1aba133..340cc4c 100644 --- a/src/G4chroma.cc +++ b/src/G4chroma.cc @@ -224,7 +224,7 @@ void export_Chroma() ; } -BOOST_PYTHON_MODULE(G4chroma) +BOOST_PYTHON_MODULE(_g4chroma) { export_Chroma(); } |