On Wed, Mar 7, 2012 at 1:16 AM, Michael Banck <mba...@gmx.net> wrote: > >> I'm not sure what you mean here. If you're doing an out-of-source >> build (which it sounds like you are), then you need to do a "make >> install" to get the built .so files copied into the $RDBASE/rdkit >> directory so that the python tests can pass. > > The general way of building Debian packages is: > > 1. Configure (run cmake in this case) > 2. Make > 3. Run testsuite, if there is any > 4. Run Make install, overriding the target directory to a staging > directory under debian/ > 5. Assemble package from the contents of the staging directory plus > additional metadata. > > This makes it impossible or at least hackish and awkward to run the > testsuite after install.
Got it. For this, you really need to do an in-tree build. > I will have to look how other cmake projects do this with compiled > python modules. Note that I set RDK_INSTALL_INTREE=OFF. > > Maybe it would indeed be easiest to do an in-tree build, but in my > opinion, it should not matter whether one builds in-tree or not. When you run a plain "make" using the cmake-generated Makefile, you end up with all the binary files deposited under the directory where the main makefile sits. For example, here's some output from a partial RDKit build of one of the python modules: /scratch/RDKit_trunk/build > make -j4 rdBase -- Configuring done -- Generating done -- Build files have been written to: /scratch/RDKit_trunk/build [ 0%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o <snip> [100%] Building CXX object Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o Linking CXX shared module ../../../rdkit/rdBase.so [100%] Built target rdBase /scratch/RDKit_trunk/build > ls rdkit/*.so rdkit/rdBase.so In order for the python tests to run, however, this file needs to be located in ../rdkit, where the rest of the python files are. This is what make install would take care of. The alternative is to do an in-tree build, shown here: /scratch/RDKit_intree > make rdBase Scanning dependencies of target RDBoost [ 0%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o <snip> Linking CXX shared module ../../../rdkit/rdBase.so [100%] Built target rdBase /scratch/RDKit_intree > ls rdkit/*.so rdkit/rdBase.so Now I can directly run the python tests. To get the "make install" working correctly into a staging area, you can provide the name of the staging directory to cmake: /scratch/RDKit_intree > cmake -DCMAKE_INSTALL_PREFIX=/scratch/usr . and then do a "make install" after you've run "make" and "ctest": /scratch/RDKit_intree > rm -rf /scratch/usr/* /scratch/RDKit_intree > make -j2 install [ 1%] Built target fastentropy <snip> -- Removed runtime path from "/scratch/usr/lib/python2.6/site-packages/rdkit/Chem/rdChemicalFeatures.so" -- Up-to-date: /scratch/usr/lib/python2.6/site-packages/rdkit/RDPaths.py And now quickly verify that something sensible happened: /scratch/RDKit_intree > ls /scratch/usr/lib/python2.6/site-packages/rdkit Avalon DistanceGeometry Makefile RDRandom.py Chem epydoc.config ML SimDivFilters cmake_install.cmake Excel Numerics sping CTestTestfile.cmake ForceField rdBase.so TestRunner.py DataManip Geometry RDConfig.py utils DataStructs __init__.py RDLogger.py VLib Dbase Logger RDPaths.py >> Up to this point I was fine, and can fix the problem, but this one: >> > rdkit-201112/rdkit/__init__.py >> is in svn, so it shouldn't be showing up as something that didn't >> originally exist. > > Right, that was probably some leftover from some unsuccessful > experiments I did with trying to add some stuff to __init__.py so it > finds the corresponding .so files. So nevermind this. ok, cool. The rest of the changes you had suggested, other than the two .sqlt files in $RDBASE/Data, are checked in. The .sqlt files are checked into svn, so they shouldn't be showing up in a list of uncleaned up files. Could it be because at least one of those files is modified during the tests? Thanks again for your work on this! -greg ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Rdkit-devel mailing list Rdkit-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-devel