Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] python3-gmpy2: restore package
Date: Mon, 11 Oct 2021 17:29:31 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-33481@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages gmpy2
https://github.com/void-linux/void-packages/pull/33481

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

A patch file from https://github.com/void-linux/void-packages/pull/33481.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gmpy2-33481.patch --]
[-- Type: text/x-diff, Size: 1993 bytes --]

From 2f41a6ce64a74046f2e6982a5f6816bcfa912465 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 11 Oct 2021 10:55:20 -0300
Subject: [PATCH] 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 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-gmpy2/template

diff --git a/srcpkgs/python3-gmpy2/template b/srcpkgs/python3-gmpy2/template
new file mode 100644
index 000000000000..80e85f1dadc4
--- /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 <tornaria@cmat.edu.uy>"
+homepage="https://github.com/aleaxit/gmpy"
+license="LGPL-3.0-or-later"
+distfiles="${PYPI_SITE}/g/gmpy2/gmpy2-${version}.tar.gz"
+checksum=86cb6d8e5837560c32c706d48d6ed25676be6b3c79e6aa5d245965b9e99231b9
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		python3 test/runtests.py
+}

             reply	other threads:[~2021-10-11 15:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 15:29 tornaria [this message]
2021-10-11 15:31 ` [PR PATCH] [Updated] " tornaria
2021-10-11 15:52 ` ahesford
2021-10-11 15:57 ` [PR PATCH] [Updated] " tornaria
2021-10-11 16:01 ` tornaria
2021-10-11 18:43 ` tornaria
2021-10-11 21:00 ` [PR PATCH] [Updated] " tornaria
2021-10-12 18:57 ` ericonr
2021-10-12 19:19 ` [PR PATCH] [Updated] " tornaria
2021-10-12 19:32 ` tornaria
2021-10-12 19:52 ` ericonr
2021-10-12 20:11 ` tornaria
2021-10-13 18:38 ` [PR PATCH] [Closed]: " ahesford
2021-10-13 18:39 ` ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-33481@inbox.vuxu.org \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).