diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-03-26 15:34:19 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-03-26 15:34:19 +0000 |
commit | 6ab4c21d2f29fb187249457f578f21b67628c44d (patch) | |
tree | 1ed4d4bd686765143b3b3567919b36e64a6051b2 /sci-chemistry/openbabel-python | |
parent | Version Bump, mainly prepared by rei4dan, #345093 (diff) | |
download | gentoo-2-6ab4c21d2f29fb187249457f578f21b67628c44d.tar.gz gentoo-2-6ab4c21d2f29fb187249457f578f21b67628c44d.tar.bz2 gentoo-2-6ab4c21d2f29fb187249457f578f21b67628c44d.zip |
Python Bindings for openbabel, writing by rei4dan
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/openbabel-python')
5 files changed, 103 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-python/ChangeLog b/sci-chemistry/openbabel-python/ChangeLog new file mode 100644 index 000000000000..e881865288d5 --- /dev/null +++ b/sci-chemistry/openbabel-python/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sci-chemistry/openbabel-python +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel-python/ChangeLog,v 1.1 2011/03/26 15:34:19 jlec Exp $ + +*openbabel-python-2.3.0 (26 Mar 2011) + + 26 Mar 2011; Justin Lecher <jlec@gentoo.org> +openbabel-python-2.3.0.ebuild, + +files/openbabel-python-2.3.0-py3_iterator.patch, + +files/openbabel-python-2.3.0-wrap_OBInternalCoord.patch, +metadata.xml: + Python Bindings for openbabel, writing by rei4dan + diff --git a/sci-chemistry/openbabel-python/files/openbabel-python-2.3.0-py3_iterator.patch b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.0-py3_iterator.patch new file mode 100644 index 000000000000..7efc0cab8dca --- /dev/null +++ b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.0-py3_iterator.patch @@ -0,0 +1,12 @@ +--- scripts/openbabel-python.i 2010-08-16 15:05:20.000000000 +0300 ++++ scripts/openbabel-python.i 2011-02-27 14:18:17.000000000 +0200 +@@ -316,6 +316,9 @@ + def __iter__(self): + return self + ++ def __next__(self): ++ return self.next() ++ + def next(self): + if not self.finished: + b = self.iter.__ref__() diff --git a/sci-chemistry/openbabel-python/files/openbabel-python-2.3.0-wrap_OBInternalCoord.patch b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.0-wrap_OBInternalCoord.patch new file mode 100644 index 000000000000..93461892995b --- /dev/null +++ b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.0-wrap_OBInternalCoord.patch @@ -0,0 +1,10 @@ +--- scripts/openbabel-python.i 2010-08-16 15:05:20.000000000 +0300 ++++ scripts/openbabel-python.i 2011-02-25 22:46:08.000000000 +0200 +@@ -120,6 +120,7 @@ + VECTORTEMPLATE_WRAP(OBRing, OpenBabel::OBRing) + VECTORTEMPLATE_WRAP(pOBRing, OpenBabel::OBRing*) + VECTORTEMPLATE_WRAP(pOBGenericData, OpenBabel::OBGenericData*) ++VECTORTEMPLATE_WRAP(pOBInternalCoord, OpenBabel::OBInternalCoord*) + + } + diff --git a/sci-chemistry/openbabel-python/metadata.xml b/sci-chemistry/openbabel-python/metadata.xml new file mode 100644 index 000000000000..78a71057d3ed --- /dev/null +++ b/sci-chemistry/openbabel-python/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci-chemistry</herd> +<longdescription> +OpenBabel is a chemical toolbox designed to speak the many languages of +chemical data. It's an open, collaborative project allowing anyone to +search, convert, analyze, or store data from molecular modeling, chemistry, +solid-state materials, biochemistry, or related areas. This package enables +to access OpenBabel library from Python programs. +</longdescription> +</pkgmetadata> diff --git a/sci-chemistry/openbabel-python/openbabel-python-2.3.0.ebuild b/sci-chemistry/openbabel-python/openbabel-python-2.3.0.ebuild new file mode 100644 index 000000000000..0a7aa1ff24e8 --- /dev/null +++ b/sci-chemistry/openbabel-python/openbabel-python-2.3.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel-python/openbabel-python-2.3.0.ebuild,v 1.1 2011/03/26 15:34:19 jlec Exp $ + +EAPI="3" + +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" +PYTHON_MODNAME="openbabel.py pybel.py" + +inherit cmake-utils eutils distutils + +DESCRIPTION="Python bindings for OpenBabel (including Pybel)" +HOMEPAGE="http://openbabel.sourceforge.net/" +SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz" + +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +SLOT="0" +LICENSE="GPL-2" +IUSE="" + +RDEPEND=" + dev-cpp/eigen:2 + dev-libs/libxml2:2 + !sci-chemistry/babel + ~sci-chemistry/openbabel-${PV} + sys-libs/zlib" +DEPEND="${RDEPEND} + =dev-lang/swig-2.0.1 + dev-util/cmake" + +S="${WORKDIR}"/openbabel-${PV} + +DISTUTILS_SETUP_FILES="${S}/scripts/python/setup.py" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-wrap_OBInternalCoord.patch \ + "${FILESDIR}"/${P}-py3_iterator.patch +} + +src_configure() { + local mycmakeargs="-DPYTHON_BINDINGS=ON" + mycmakeargs="${mycmakeargs} + -DRUN_SWIG=ON" + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile _openbabel + cd "${WORKDIR}/${P}_build/scripts" + distutils_src_compile +} + +src_install() { + cd "${WORKDIR}/${P}_build/scripts" + distutils_src_install +} |