diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-10-11 14:24:22 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-10-11 14:24:22 +0000 |
commit | 425a744e913959b8cbe016d1582a9d394e848f4b (patch) | |
tree | 5753f6f140e0d573fda014afbb26147011e00d3f /sci-chemistry/aria | |
parent | remove old (diff) | |
download | gentoo-2-425a744e913959b8cbe016d1582a9d394e848f4b.tar.gz gentoo-2-425a744e913959b8cbe016d1582a9d394e848f4b.tar.bz2 gentoo-2-425a744e913959b8cbe016d1582a9d394e848f4b.zip |
Added fix for python import
(Portage version: 2.2.0_alpha66/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/aria')
-rw-r--r-- | sci-chemistry/aria/ChangeLog | 8 | ||||
-rw-r--r-- | sci-chemistry/aria/aria-2.3.2-r2.ebuild | 94 | ||||
-rw-r--r-- | sci-chemistry/aria/files/aria-2.3.2-python.patch | 30 |
3 files changed, 131 insertions, 1 deletions
diff --git a/sci-chemistry/aria/ChangeLog b/sci-chemistry/aria/ChangeLog index 51206a1a1b8c..040317c19665 100644 --- a/sci-chemistry/aria/ChangeLog +++ b/sci-chemistry/aria/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-chemistry/aria # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/aria/ChangeLog,v 1.10 2011/10/07 19:23:04 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/aria/ChangeLog,v 1.11 2011/10/11 14:24:22 jlec Exp $ + +*aria-2.3.2-r2 (11 Oct 2011) + + 11 Oct 2011; Justin Lecher <jlec@gentoo.org> +aria-2.3.2-r2.ebuild, + +files/aria-2.3.2-python.patch: + Added fix for python import *aria-2.3.2-r1 (07 Oct 2011) diff --git a/sci-chemistry/aria/aria-2.3.2-r2.ebuild b/sci-chemistry/aria/aria-2.3.2-r2.ebuild new file mode 100644 index 000000000000..a24da015ef34 --- /dev/null +++ b/sci-chemistry/aria/aria-2.3.2-r2.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/aria/aria-2.3.2-r2.ebuild,v 1.1 2011/10/11 14:24:22 jlec Exp $ + +EAPI=3 + +PYTHON_DEPEND="2" +PYTHON_USE_WITH="tk" + +inherit base eutils python versionator + +MY_P="${PN}$(get_version_component_range 1-2 ${PV})" + +DESCRIPTION="Automated NOE assignment and NMR structure calculation" +HOMEPAGE="http://aria.pasteur.fr/" +SRC_URI="http://aria.pasteur.fr/archives/${MY_P}.2.tar.gz" + +SLOT="0" +LICENSE="cns" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="examples" + +RDEPEND=" + sci-chemistry/clashlist + sci-chemistry/procheck + sci-libs/clashscore-db + dev-python/numpy + dev-python/matplotlib[tk] + >=sci-chemistry/cns-1.2.1-r7[aria,openmp] + >=dev-lang/tk-8.3 + >=sci-chemistry/ccpn-2.0.5 + >=dev-tcltk/tix-8.1.4" +DEPEND="${RDEPEND}" + +RESTRICT="fetch" + +S="${WORKDIR}/${MY_P}" + +pkg_nofetch(){ + einfo "Go to ${HOMEPAGE}, download ${A}" + einfo "and place it in ${DISTDIR}" +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-python.patch \ + "${FILESDIR}"/${P}-through-space.patch +} + +src_test(){ + export CCPNMR_TOP_DIR="${EPREFIX}"/$(python_get_sitedir) + export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python + $(PYTHON) check.py || die +} + +src_install(){ + insinto "$(python_get_sitedir)/${PN}" + doins -r src aria2.py || die "failed to install ${PN}" + insinto "$(python_get_sitedir)/${PN}"/cns + doins -r cns/{protocols,toppar,src/helplib} || die "failed to install cns part" + + if use examples; then + insinto /usr/share/${P}/ + doins -r examples || die + fi + + # ENV + cat >> "${T}"/20aria <<- EOF + ARIA2="${EPREFIX}/$(python_get_sitedir)/${PN}" + EOF + + doenvd "${T}"/20aria + + # Launch Wrapper + cat >> "${T}"/aria <<- EOF + #!/bin/sh + export CCPNMR_TOP_DIR="${EPREFIX}/$(python_get_sitedir)" + export PYTHONPATH="${EPREFIX}/$(python_get_sitedir)/ccpn/python" + exec "$(PYTHON)" -O "\${ARIA2}"/aria2.py \$@ + EOF + + dobin "${T}"/aria || die "failed to install wrapper" + dosym aria /usr/bin/aria2 + + dodoc README || die +} + +pkg_postinst() { + python_mod_optimize ${PN} +} + +pkg_postrm() { + python_mod_cleanup ${PN} +} diff --git a/sci-chemistry/aria/files/aria-2.3.2-python.patch b/sci-chemistry/aria/files/aria-2.3.2-python.patch new file mode 100644 index 000000000000..1f9ae1fcc5f6 --- /dev/null +++ b/sci-chemistry/aria/files/aria-2.3.2-python.patch @@ -0,0 +1,30 @@ + src/py/aria/legacy/QualityChecks/Descriptive.py | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/py/aria/legacy/QualityChecks/Descriptive.py b/src/py/aria/legacy/QualityChecks/Descriptive.py +index ae5913c..550d20c 100644 +--- a/src/py/aria/legacy/QualityChecks/Descriptive.py ++++ b/src/py/aria/legacy/QualityChecks/Descriptive.py +@@ -1,3 +1,6 @@ ++from math import * ++from numpy import * ++ + class Descriptive: + """ + some basic statistics +@@ -55,7 +58,6 @@ class Descriptive: + + def getStdDev(self): + if( len(self.myData) == 0): return None +- from math import * + if( (self.count - 1) > 0 ): + return sqrt( self.pseudoVariance/ (self.count - 1)) + else: +@@ -89,7 +91,6 @@ class Descriptive: + def getMedian(self): + if( len(self.myData) == 0): return None + if( self.median == None ): +- from numpy import * + sort(self.myData) + if( self.count%2 == 1): + self.median = self.myData[(self.count-1)/2] |