diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-01-18 13:34:57 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-01-18 13:34:57 +0000 |
commit | 2b858583c860d5835d0bfd38001721e6caa6ba24 (patch) | |
tree | c0941b1552e640684abcc51d924ea9fd5fb8b5b4 /dev-python/mpmath | |
parent | One more language is available. (diff) | |
download | gentoo-2-2b858583c860d5835d0bfd38001721e6caa6ba24.tar.gz gentoo-2-2b858583c860d5835d0bfd38001721e6caa6ba24.tar.bz2 gentoo-2-2b858583c860d5835d0bfd38001721e6caa6ba24.zip |
dev-python/mpmath: Bump to new python stuff and fix build for py3, #438584
(Portage version: 2.2.0_alpha154/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
Diffstat (limited to 'dev-python/mpmath')
-rw-r--r-- | dev-python/mpmath/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/mpmath/metadata.xml | 18 | ||||
-rw-r--r-- | dev-python/mpmath/mpmath-0.17.ebuild | 79 |
3 files changed, 56 insertions, 49 deletions
diff --git a/dev-python/mpmath/ChangeLog b/dev-python/mpmath/ChangeLog index a63d4d2f601e..a139ce524bc4 100644 --- a/dev-python/mpmath/ChangeLog +++ b/dev-python/mpmath/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/mpmath -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/ChangeLog,v 1.24 2012/06/26 07:01:58 jlec Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/ChangeLog,v 1.25 2013/01/18 13:34:57 jlec Exp $ + + 18 Jan 2013; Justin Lecher <jlec@gentoo.org> mpmath-0.17.ebuild, + metadata.xml: + Bump to new python stuff and fix build for py3, #438584 26 Jun 2012; Justin Lecher <jlec@gentoo.org> mpmath-0.17.ebuild: Drop unnecessary PYTHON_DEPEND diff --git a/dev-python/mpmath/metadata.xml b/dev-python/mpmath/metadata.xml index ade8696b3c48..b7450c8b22a4 100644 --- a/dev-python/mpmath/metadata.xml +++ b/dev-python/mpmath/metadata.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <herd>sci-mathematics</herd> - <maintainer> - <email>grozin@gentoo.org</email> - <name>Andrey Grozin</name> - </maintainer> - <longdescription lang="en"> + <herd>sci-mathematics</herd> + <maintainer> + <email>grozin@gentoo.org</email> + <name>Andrey Grozin</name> + </maintainer> + <longdescription lang="en"> A Python library for arbitrary-precision floating-point arithmetic </longdescription> - <use> - <flag name="matplotlib">Add support for <pkg>dev-python/matplotlib</pkg></flag> - </use> + <use> + <flag name="matplotlib">Add support for <pkg>dev-python/matplotlib</pkg></flag> + </use> </pkgmetadata> diff --git a/dev-python/mpmath/mpmath-0.17.ebuild b/dev-python/mpmath/mpmath-0.17.ebuild index 7ee77de1e3ed..f175ee22b5a1 100644 --- a/dev-python/mpmath/mpmath-0.17.ebuild +++ b/dev-python/mpmath/mpmath-0.17.ebuild @@ -1,14 +1,12 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/mpmath-0.17.ebuild,v 1.7 2012/06/26 07:01:58 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/mpmath-0.17.ebuild,v 1.8 2013/01/18 13:34:57 jlec Exp $ -EAPI=4 +EAPI=5 -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="*-pypy-*" -DISTUTILS_SRC_TEST="py.test" +PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2} ) -inherit distutils eutils +inherit distutils-r1 eutils # virtualx MY_PN=${PN}-all MY_P=${MY_PN}-${PV} @@ -20,61 +18,66 @@ SRC_URI="http://mpmath.googlecode.com/files/${MY_P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86 ~x86-linux ~ppc-macos" -IUSE="doc examples gmp matplotlib" +IUSE="doc examples gmp matplotlib test" RDEPEND=" gmp? ( dev-python/gmpy ) matplotlib? ( dev-python/matplotlib )" DEPEND="${RDEPEND} - doc? ( dev-python/sphinx )" + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/pytest[${PYTHON_USEDEP}] )" S="${WORKDIR}/${MY_P}" -DOCS="CHANGES" - -src_prepare() { - distutils_src_prepare - - epatch \ - "${FILESDIR}/${PN}.patch" \ +python_prepare_all() { + local PATCHES=( + "${FILESDIR}/${PN}.patch" "${FILESDIR}/${P}-python-3.2.patch" + ) # this fails with the current version of dev-python/py - rm -f ${PN}/conftest.py + rm -f ${PN}/conftest.py || die # this test requires X - rm -f ${PN}/tests/test_visualization.py -} + rm -f ${PN}/tests/test_visualization.py || die -src_compile() { - distutils_src_compile + distutils-r1_python_prepare_all +} +python_compile_all() { if use doc; then einfo "Generation of documentation" - pushd doc > /dev/null - PYTHONPATH="${S}/build-$(PYTHON -f --ABI)/lib" "$(PYTHON -f)" build.py || die "Generation of documentation failed" - popd > /dev/null + cd doc || die + "${PYTHON}" build.py || die "Generation of documentation failed" fi } -src_install() { - distutils_src_install +#src_test() { +# local DISTUTILS_NO_PARALLEL_BUILD=true +# VIRTUALX_COMMAND="distutils-r1_src_test" +# virtualmake +#} - use doc && dohtml -r doc/build/* +python_test() { + py.test -v || die +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/build/. ) if use examples; then insinto /usr/share/doc/${PF}/examples - doins demo/* || die "Installation of examples failed" + doins demo/* fi + distutils-r1_python_install_all +} - rm_unneeded() { - local path="${ED}$(python_get_sitedir)/${PN}/libmp/" - if [[ "${PYTHON_ABI}" == 2.* ]]; then - rm -f "${path}exec_py3.py" - elif [[ "${PYTHON_ABI}" == 3.* ]]; then - rm -f "${path}exec_py2.py" - fi - } - - python_execute_function rm_unneeded +python_install() { + distutils-r1_python_install + local path="${ED}$(python_get_sitedir)/${PN}/libmp/" + if [[ "${EPYTHON}" != python2* ]]; then + rm -f "${path}exec_py2.py" || ide + elif [[ "${EPYTHON}" != python3 ]]; then + rm -f "${path}exec_py3.py" || die + fi } |