summaryrefslogtreecommitdiff
path: root/community-testing/python-openbabel
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-17 01:15:52 -0700
committerroot <root@rshg054.dnsready.net>2012-10-17 01:15:52 -0700
commitc84b2cd310f86dc50c4f52a5907cb17652e8c87c (patch)
treeef3dc614b68e1e6f5966a5d29f3970e27bb7c4f9 /community-testing/python-openbabel
parent99d0ec7ebad2eda5f3a03098962e3b250e3bef4c (diff)
Wed Oct 17 01:14:52 PDT 2012
Diffstat (limited to 'community-testing/python-openbabel')
-rw-r--r--community-testing/python-openbabel/PKGBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/community-testing/python-openbabel/PKGBUILD b/community-testing/python-openbabel/PKGBUILD
new file mode 100644
index 000000000..130117080
--- /dev/null
+++ b/community-testing/python-openbabel/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 78091 2012-10-16 11:53:00Z allan $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Michal Bozon <bozonm@vscht.cz>
+
+pkgname=python-openbabel
+pkgver=2.3.1
+pkgrel=3
+pkgdesc="Python bindings of openbabel library"
+arch=('i686' 'x86_64')
+url="http://openbabel.org/wiki/Python"
+license=('GPL')
+depends=('python' 'gcc-libs' "openbabel=${pkgver}" 'eigen2')
+makedepends=('swig' 'cmake')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/openbabel/openbabel-$pkgver.tar.gz)
+md5sums=('1f029b0add12a3b55582dc2c832b04f8')
+
+build() {
+ cd "${srcdir}/openbabel-$pkgver"
+
+ # Create babelconfig.h
+ cmake .
+
+ # Regenerate interface with the patched swig 2.0.2
+ cd scripts
+ swig -I../include/ -python -py3 -c++ openbabel-python.i
+ mv openbabel-python_wrap.cxx python/openbabel-python.cpp
+ mv openbabel.py python/
+
+ cd python
+ sed -i '19i os.path.join("/usr/include/openbabel-2.0"),' setup.py
+ sed -i '20i os.path.join("/usr/include/eigen2"),' setup.py
+}
+
+package() {
+ cd "${srcdir}/openbabel-$pkgver/scripts/python"
+ python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
+}