...
This package, which builds a shared library and a python wrapper library, had only a minimal SConscript and no xxxLib.py. I made something up including these lines:ons
Code Block |
---|
BayesianBlocksLib = libEnv.SharedLibrary('BayesianBlocks' , ['src/Exposure.cxx','src/BayesianBlocks.cxx']) swigEnv.Tool('BayesianBlocksLib') lib_BayesianBlocks = swigEnv.SwigLibrary('lib_BayesianBlocks', 'src/BayesianBlocks.i') swigEnv.Tool('registerTargets', package="BayesianBlocks", libraryCxts=\[\[BayesianBlocksLib, libEnv\]\], swigLibraryCxts=\[\[lib_BayesianBlocks, swigEnv\]\], includes=listFiles(\['BayesianBlocks/*.h'\]) ) |
This built without error and installed libraries libBayesianBlocks.so and lib_BayesianBlocks.so, but when running python/test_BayesianBlocks.py
- failure of line import BayesianBlocks. There is a file build/<variant>/source/BayesianBlocks.py which is presumably the right file, but it isn't installed anywhere. Temporary work-around was to copy it to python directory
- in file BayesianBlocks.py failure of import _BayesianBlocks Work-around was to change line to import lib_BayesianBlocks.
- unable to find liboptimizers.so This is because of problem with _setup described above. The file exists in ST lib directory.
Proposed actions: Install file BayesianBlocks.py (and similar files created by Swig) in a suitable place, e.g. top-level python directory. Adjust naming of swig wrapper library so all references agree.