From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4550E138335 for ; Fri, 22 Nov 2019 08:40:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52A36E0858; Fri, 22 Nov 2019 08:40:52 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E4405E0858 for ; Fri, 22 Nov 2019 08:40:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DA7C034D1E8 for ; Fri, 22 Nov 2019 08:40:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 393058BE for ; Fri, 22 Nov 2019 08:40:49 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1574412045.b8d0cd9b149b79abbda6ef409ef8c00ccf0eedfc.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/gmpy/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/gmpy/gmpy-2.0.8-r1.ebuild X-VCS-Directories: dev-python/gmpy/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: b8d0cd9b149b79abbda6ef409ef8c00ccf0eedfc X-VCS-Branch: master Date: Fri, 22 Nov 2019 08:40:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 16f8172b-2e4c-49f8-9c80-89be931bb037 X-Archives-Hash: c467351fcf9935fa38198d790ba4a182 commit: b8d0cd9b149b79abbda6ef409ef8c00ccf0eedfc Author: Michał Górny gentoo org> AuthorDate: Fri Nov 22 08:35:35 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Nov 22 08:40:45 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8d0cd9b dev-python/gmpy: Bump to EAPI 7 Signed-off-by: Michał Górny gentoo.org> dev-python/gmpy/gmpy-2.0.8-r1.ebuild | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/dev-python/gmpy/gmpy-2.0.8-r1.ebuild b/dev-python/gmpy/gmpy-2.0.8-r1.ebuild new file mode 100644 index 00000000000..49b20e3409b --- /dev/null +++ b/dev-python/gmpy/gmpy-2.0.8-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} ) + +inherit distutils-r1 + +MY_PN="${PN}2" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Python bindings for GMP, MPC, MPFR and MPIR libraries" +HOMEPAGE="https://github.com/aleaxit/gmpy" +SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.zip" +S="${WORKDIR}"/${MY_P} + +LICENSE="LGPL-3+" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="doc mpir" + +RDEPEND=" + >=dev-libs/mpc-1.0.2:= + >=dev-libs/mpfr-3.1.2:= + !mpir? ( dev-libs/gmp:0= ) + mpir? ( sci-libs/mpir:= )" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/unzip + doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )" + +PATCHES=( + "${FILESDIR}"/${P}-fix-mpir-types.patch + "${FILESDIR}"/gmpy-2.0.8-test-exit-status.patch +) + +python_check_deps() { + use doc || return 0 + has_version "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +python_prepare_all() { + distutils-r1_python_prepare_all + + # rm non std test file + rm test*/gmpy_test_thr.py || die + # testing for contents of __dir__ is really silly, and fails + sed -i -e '/__dir__/,+1d' test3/*.py || die +} + +python_configure_all() { + mydistutilsargs=( + $(usex mpir --mpir --gmp) + ) +} + +python_compile() { + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + distutils-r1_python_compile +} + +python_compile_all() { + if use doc; then + emake -C docs html + HTML_DOCS=( docs/_build/html/. ) + fi +} + +python_test() { + cd test || die + "${EPYTHON}" runtests.py || die "tests failed under ${EPYTHON}" + if python_is_python3; then + cd ../test3 || die + else + cd ../test2 || die + fi + "${EPYTHON}" gmpy_test.py || die "tests failed under ${EPYTHON}" +}