From 798728176ad8a389f3dab334d42c2a1fcdafa100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 11 Oct 2021 10:55:20 -0300 Subject: [PATCH 1/2] python3-gmpy2: restore package Upstream 2.1.0rc1 builds on python3.10. This package is used by python3-mpmath for multiprecission arithmetic. If not installed, mpmath defaults to python bigints which are very slow. For example: compute 1M digits of pi using sympy: $ isympy # without python3-gmpy2 In [1]: %time a=pi.n(1_000_000) CPU times: user 49.4 s, sys: 2.96 ms, total: 49.4 s Wall time: 49.4 s vs. $ isympy # with python3-gmpy2 In [1]: %time a=pi.n(1_000_000) CPU times: user 632 ms, sys: 5.99 ms, total: 638 ms Wall time: 639 ms Note that just installing python3-gmpy2 brings this improvement. Arguably python3-gmpy2 could be made a dependency of python3-mpmath. This reverts commit f91cea99ddace872a5cdf0ae5d93fcc15b2f3191. Also: - fix hostmakedepends - make tests work - adopt --- srcpkgs/python3-gmpy2/template | 19 +++++++++++++++++++ srcpkgs/python3-gmpy2/update | 1 + 2 files changed, 20 insertions(+) create mode 100644 srcpkgs/python3-gmpy2/template create mode 100644 srcpkgs/python3-gmpy2/update diff --git a/srcpkgs/python3-gmpy2/template b/srcpkgs/python3-gmpy2/template new file mode 100644 index 000000000000..c86a5639e25d --- /dev/null +++ b/srcpkgs/python3-gmpy2/template @@ -0,0 +1,19 @@ +# Template file for 'python3-gmpy2' +pkgname=python3-gmpy2 +version=2.1.0rc1 +revision=1 +wrksrc="gmpy2-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +makedepends="python3-devel gmp-devel mpfr-devel libmpc-devel" +short_desc="Python3 interface to GMP, MPFR and MPC libraries" +maintainer="Gonzalo TornarĂ­a " +license="LGPL-3.0-or-later" +homepage="https://github.com/aleaxit/gmpy" +distfiles="${PYPI_SITE}/g/gmpy2/gmpy2-${version}.tar.gz" +checksum=86cb6d8e5837560c32c706d48d6ed25676be6b3c79e6aa5d245965b9e99231b9 + +do_check() { + PYTHONPATH="$(cd build/lib* && pwd)" \ + python3 test/runtests.py +} diff --git a/srcpkgs/python3-gmpy2/update b/srcpkgs/python3-gmpy2/update new file mode 100644 index 000000000000..b5703618d280 --- /dev/null +++ b/srcpkgs/python3-gmpy2/update @@ -0,0 +1 @@ +ignore="*a[1-9] *b[1-9] *rc[1-9]" From 04834bbd70bd97790fa35da33832f70f5b16e05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 11 Oct 2021 12:57:04 -0300 Subject: [PATCH 2/2] removed-packages: restore python3-gmpy2 --- srcpkgs/removed-packages/template | 1 - 1 file changed, 1 deletion(-) diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index 3e1adba6f210..a912baf9bb6a 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -260,7 +260,6 @@ replaces=" python3-SPARQLWrapper<=1.8.4_4 python3-bluez<=0.23_2 python3-grako<=3.99.9_7 - python3-gmpy2<=2.0.8_8 python3-keepalive<=0.5_6 python3-pyPEG2<=2.15.2_7 python3-pyenet<=5.15.0_2