From 496b01d40c62a7716bcf72d0007623c09c4cff51 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 11 Jan 2023 15:55:11 +0000 Subject: [PATCH] import ports/math/py-gmpy2, ok tb@ gmpy2 is an optimized, C-coded Python extension module that supports fast multiple-precision arithmetic. gmpy2 is based on the original gmpy module but adds support for correctly rounded multiple-precision real arithmetic (using the MPFR library) and complex arithmetic (using the MPC library). --- math/py-gmpy2/Makefile | 32 ++++++++++++++++++++++++++++++++ math/py-gmpy2/distinfo | 2 ++ math/py-gmpy2/pkg/DESCR | 6 ++++++ math/py-gmpy2/pkg/PLIST | 16 ++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 math/py-gmpy2/Makefile create mode 100644 math/py-gmpy2/distinfo create mode 100644 math/py-gmpy2/pkg/DESCR create mode 100644 math/py-gmpy2/pkg/PLIST diff --git a/math/py-gmpy2/Makefile b/math/py-gmpy2/Makefile new file mode 100644 index 00000000000..079b63024a7 --- /dev/null +++ b/math/py-gmpy2/Makefile @@ -0,0 +1,32 @@ +COMMENT= interface to GMP/MPIR, MPFR, and MPC for Python + +MODPY_EGG_VERSION= 2.1.5 +DISTNAME= gmpy2-${MODPY_EGG_VERSION} +PKGNAME= py-${DISTNAME} + +CATEGORIES= math + +# https://github.com/aleaxit/gmpy +HOMEPAGE= https://gmpy2.readthedocs.io/ + +# LGPLv3+ +PERMIT_PACKAGE= Yes + +WANTLIB += gmp m mpc mpfr + +FLAVORS= python3 +FLAVOR= python3 + +MODULES= lang/python +MODPY_PI= Yes +MODPY_PYBUILD= setuptools + +LIB_DEPENDS= devel/gmp \ + devel/libmpc \ + devel/mpfr +CFLAGS+= -I${LOCALBASE}/include + +do-test: + cd ${WRKSRC}; ${TEST_ENV} ${MODPY_BIN} test/runtests.py + +.include diff --git a/math/py-gmpy2/distinfo b/math/py-gmpy2/distinfo new file mode 100644 index 00000000000..8ae923f5cd9 --- /dev/null +++ b/math/py-gmpy2/distinfo @@ -0,0 +1,2 @@ +SHA256 (gmpy2-2.1.5.tar.gz) = vCl/H9jDd65npPST/A+Sbl0bFX5cNC4wpNhNx7n5XZY= +SIZE (gmpy2-2.1.5.tar.gz) = 261709 diff --git a/math/py-gmpy2/pkg/DESCR b/math/py-gmpy2/pkg/DESCR new file mode 100644 index 00000000000..945c0c79355 --- /dev/null +++ b/math/py-gmpy2/pkg/DESCR @@ -0,0 +1,6 @@ +gmpy2 is an optimized, C-coded Python extension module that supports +fast multiple-precision arithmetic. + +gmpy2 is based on the original gmpy module but adds support for +correctly rounded multiple-precision real arithmetic (using the MPFR +library) and complex arithmetic (using the MPC library). diff --git a/math/py-gmpy2/pkg/PLIST b/math/py-gmpy2/pkg/PLIST new file mode 100644 index 00000000000..b999ceec53f --- /dev/null +++ b/math/py-gmpy2/pkg/PLIST @@ -0,0 +1,16 @@ +lib/python${MODPY_VERSION}/site-packages/gmpy2/ +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/ +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/COPYING +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/COPYING.LESSER +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/METADATA +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/RECORD +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/WHEEL +lib/python${MODPY_VERSION}/site-packages/gmpy2-${MODPY_EGG_VERSION}.dist-info/top_level.txt +lib/python${MODPY_VERSION}/site-packages/gmpy2/__init__.pxd +lib/python${MODPY_VERSION}/site-packages/gmpy2/__init__.py +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/gmpy2/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/gmpy2/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION} +lib/python${MODPY_VERSION}/site-packages/gmpy2/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +@so lib/python${MODPY_VERSION}/site-packages/gmpy2/gmpy2.${MODPY_PYC_MAGIC_TAG}so +lib/python${MODPY_VERSION}/site-packages/gmpy2/gmpy2.h +lib/python${MODPY_VERSION}/site-packages/gmpy2/gmpy2.pxd