Upstream 2.1.0rc1 builds on python3.10, last official version does not.
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 f91cea99dd
.
Also:
- fix hostmakedepends
- make tests work
- adopt
20 lines
657 B
Bash
20 lines
657 B
Bash
# 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"
|
|
depends="python3"
|
|
short_desc="Python3 interface to GMP, MPFR and MPC libraries"
|
|
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
|
|
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
|
|
}
|