diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-01-29 16:14:36 +0100 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-01-29 16:14:36 +0100 |
commit | b61bef4418f124efdf37752805951f79b6572a7a (patch) | |
tree | 22007b4ab8b9569950c8485b2a60c338d8676a73 | |
parent | unmask scilab-5.4 (diff) | |
download | sci-b61bef4418f124efdf37752805951f79b6572a7a.tar.gz sci-b61bef4418f124efdf37752805951f79b6572a7a.tar.bz2 sci-b61bef4418f124efdf37752805951f79b6572a7a.zip |
sci-chemistry/pymol: Bump python eclass
Package-Manager: portage-2.2.0_alpha161
-rw-r--r-- | sci-chemistry/pymol/ChangeLog | 5 | ||||
-rw-r--r-- | sci-chemistry/pymol/metadata.xml | 20 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-9999.ebuild | 57 |
3 files changed, 42 insertions, 40 deletions
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog index 83d97e1b7..c88876abd 100644 --- a/sci-chemistry/pymol/ChangeLog +++ b/sci-chemistry/pymol/ChangeLog @@ -1,7 +1,10 @@ # ChangeLog for sci-chemistry/pymol -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 29 Jan 2013; Justin Lecher <jlec@gentoo.org> pymol-9999.ebuild, metadata.xml: + Bump python eclass + 15 Oct 2012; Justin Lecher <jlec@gentoo.org> pymol-9999.ebuild: Add mime type definition diff --git a/sci-chemistry/pymol/metadata.xml b/sci-chemistry/pymol/metadata.xml index 1a70ddcdf..8ada2f2fd 100644 --- a/sci-chemistry/pymol/metadata.xml +++ b/sci-chemistry/pymol/metadata.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <pkgmetadata> - <herd>sci-chemistry</herd> - <maintainer> - <email>jlec@gentoo.org</email> - </maintainer> - <use> - <flag name="apbs">Pymol supprt for sci-chemistry/apbs</flag> - <flag name="numpy">Enable numpy support for Pymol</flag> - <flag name="vmd">Builds molfile plugin support</flag> - <flag name="web">Install Pymodule needed for web app support</flag> - </use> + <herd>sci-chemistry</herd> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> + <use> + <flag name="apbs">Pymol supprt for sci-chemistry/apbs</flag> + <flag name="numpy">Enable numpy support for Pymol</flag> + <flag name="vmd">Builds molfile plugin support</flag> + <flag name="web">Install Pymodule needed for web app support</flag> + </use> </pkgmetadata> diff --git a/sci-chemistry/pymol/pymol-9999.ebuild b/sci-chemistry/pymol/pymol-9999.ebuild index 932aa80eb..5cddebf77 100644 --- a/sci-chemistry/pymol/pymol-9999.ebuild +++ b/sci-chemistry/pymol/pymol-9999.ebuild @@ -1,16 +1,13 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=4 +EAPI=5 -PYTHON_DEPEND="2:2.7" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.* *-jython 2.7-pypy-*" -PYTHON_USE_WITH="tk" -PYTHON_MODNAME="${PN} chempy pmg_tk pmg_wx" +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="tk" -inherit distutils eutils fdo-mime prefix subversion versionator +inherit distutils-r1 fdo-mime prefix subversion versionator DESCRIPTION="A Python-extensible molecular graphics system." HOMEPAGE="http://pymol.sourceforge.net/" @@ -24,7 +21,7 @@ IUSE="apbs numpy vmd web" DEPEND=" dev-python/numpy - dev-python/pmw + dev-python/pmw[${PYTHON_USEDEP}] media-libs/freetype:2 media-libs/glew media-libs/libpng @@ -45,18 +42,16 @@ src_unpack() { subversion_src_unpack } -src_prepare() { - epatch \ - "${FILESDIR}"/${P}-setup.py.patch \ - "${FILESDIR}"/${P}-data-path.patch \ +python_prepare_all() { + local PATCHES=( + "${FILESDIR}"/${P}-setup.py.patch + "${FILESDIR}"/${P}-data-path.patch "${FILESDIR}"/${P}-flags.patch + "${FILESDIR}"/${P}-prefix.patch + ) - use web || epatch "${FILESDIR}"/${P}-web.patch - - epatch "${FILESDIR}"/${P}-prefix.patch && \ - eprefixify setup.py - - use vmd && epatch "${FILESDIR}"/${P}-vmd.patch + use web || PATCHES+=( "${FILESDIR}"/${P}-web.patch ) + use vmd && PATCHES+=( "${FILESDIR}"/${P}-vmd.patch ) if use numpy; then sed \ @@ -66,29 +61,33 @@ src_prepare() { rm ./modules/pmg_tk/startup/apbs_tools.py || die - echo "site_packages = \'$(python_get_sitedir -f)\'" > setup3.py || die + python_export python2_7 EPYTHON PYTHON_SITEDIR + echo "site_packages = \'$(python_get_sitedir)\'" > setup3.py || die sed \ -e "s:/opt/local:${EPREFIX}/usr:g" \ -e '/ext_comp_args/s:\[.*\]:[]:g' \ -i setup.py || die - # python 3.* fix - # sed '452,465d' -i setup.py - distutils_src_prepare + distutils-r1_python_prepare_all + + eprefixify setup.py } -src_configure() { - : +src_prepare() { + subversion_src_prepare + distutils-r1_src_prepare } -src_install() { - distutils_src_install +python_install_all() { + distutils-r1_python_install_all + + python_export python2_7 EPYTHON # These environment variables should not go in the wrapper script, or else # it will be impossible to use the PyMOL libraries from Python. cat >> "${T}"/20pymol <<- EOF - PYMOL_PATH="${EPREFIX}/$(python_get_sitedir -f)/${PN}" + PYMOL_PATH="${EPREFIX}/$(python_get_sitedir)/${PN}" PYMOL_DATA="${EPREFIX}/usr/share/pymol/data" PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts" EOF @@ -97,7 +96,7 @@ src_install() { cat >> "${T}"/pymol <<- EOF #!/bin/sh - $(PYTHON -f) -O \${PYMOL_PATH}/__init__.py -q \$* + ${EPYTHON} -O \${PYMOL_PATH}/__init__.py -q \$* EOF dobin "${T}"/pymol |