On Thu, Oct 18, 2012 at 04:25:59PM -0400, Geoffrey Hutchison wrote: > > On Oct 16, 2012, at 1:40 PM, Reinis Danne wrote: > > > Still I think this would be useful to have also in OB outside > > Gentoo packaging. Current implementation shifts all the burden > > of installing to user, but we can at least to try to make that > > easier. This doesn't change default behaviour, but it exposes > > for customization some of build system variables. > > > I think this is likely a useful addition. I haven't looked at > the patch itself, but this comes up with Mac. For example, if > I wanted to ship Python binary bindings for Mac, I'd have to > compile against Apple's Python 2.5, 2.6, 2.7, etc. for > different Mac OS versions. I actually have all of those on my > drive, but this patch would let me have a general libopenbabel > Mac binary, and then different Pybel binaries.
Great, then I'll be looking into adding this also for other bindings. I'm not familiar with how Mac handles system packages and how Python behaves there, but this is roughly what I'm doing on Gentoo. Run swig once directly in src dir. For each Python version run configure in separate build dir: local mycmakeargs="${mycmakeargs} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_RPATH= -DBINDINGS_ONLY=ON -DBABEL_SYSTEM_LIBRARY=${EPREFIX}/usr/$(get_libdir)/libopenbabel.so -DOB_MODULE_PATH=${EPREFIX}/usr/$(get_libdir)/openbabel/${PV} -DLIB_INSTALL_DIR=${ED}/usr/$(get_libdir)/${EPYTHON}/site-packages -DPYTHON_BINDINGS=ON -DPYTHON_EXECUTABLE=${PYTHON} -DPYTHON_INCLUDE_DIR=${EPREFIX}/usr/include/${EPYTHON} -DPYTHON_LIBRARY=${EPREFIX}/usr/$(get_libdir)/lib${EPYTHON}.so $(cmake-utils_use_enable test TESTS)" For each Python version compile bindings: make bindings_python If tests were enabled, then have to symlink binaries: ln -s "${EPREFIX}/usr/bin/babel" bin/babel ln -s "${EPREFIX}/usr/bin/obabel" bin/obabel ctest -R py And finally install Python bindings component (_openbabel.so, openbabel.py and pybel.py): python_foreach_impl cmake -DCOMPONENT=bindings_python -P cmake_install.cmake Hope that helps setting it up. Reinis ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel