[arch-commits] Commit in python-fastnumbers/trunk (2 files)

David Runge dvzrv at archlinux.org
Thu Nov 19 20:07:56 UTC 2020


    Date: Thursday, November 19, 2020 @ 20:07:55
  Author: dvzrv
Revision: 757718

Prepare for python 3.9.0.

Add patch to fix use of (now) non-public function (thx, @felixonmars).
https://github.com/SethMMorton/fastnumbers/issues/43
Run pytest with verbose flag.

Added:
  python-fastnumbers/trunk/python-fastnumbers-3.0.0-python3.9.patch
Modified:
  python-fastnumbers/trunk/PKGBUILD

------------------------------------------+
 PKGBUILD                                 |   20 ++++++++++++++------
 python-fastnumbers-3.0.0-python3.9.patch |   13 +++++++++++++
 2 files changed, 27 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-19 20:06:12 UTC (rev 757717)
+++ PKGBUILD	2020-11-19 20:07:55 UTC (rev 757718)
@@ -1,4 +1,5 @@
 # Maintainer: David Runge <dvzrv at archlinux.org>
+
 _name=fastnumbers
 pkgname=python-fastnumbers
 pkgver=3.0.0
@@ -10,11 +11,19 @@
 depends=('python')
 makedepends=('python-setuptools')
 checkdepends=('python-pytest' 'python-hypothesis')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha512sums=('31a0e1bfd503204185b26d29172e1f6ae9f6a19328ce2b4eb93e50335e22f81802c5c3f0a42b242ce914bf403c7cfc279166c33a4843e963329b666cd949c3b0')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+        "${pkgname}-3.0.0-python3.9.patch")
+sha512sums=('31a0e1bfd503204185b26d29172e1f6ae9f6a19328ce2b4eb93e50335e22f81802c5c3f0a42b242ce914bf403c7cfc279166c33a4843e963329b666cd949c3b0'
+            'eda461a1e062c1fc1624d49ef77fb0ca4f770b461086ac283e7b7fce1fbfb29a7bbe893d0fe29b1b3d787da0b53b27aefcc2fa97bfb3fc04319ea5634b932ef3')
+b2sums=('2fab831be7054eca8b1d0fd4a2ae5188d6ed3d124c0e4467fe2443ad3300380f494b6901450a12512d9ac075b832bf9dfc546be2e3d288c6b824cd9ffbb5ac90'
+        'bacb2cc5d28b2e7af591022899711bc18da96477cbf4c9b9925159f6afe29e282c023cb2d3f819ccf79da7e406f83891db14aac4ac567188da2f18cc42a52b74')
 
 prepare() {
   mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  # add fix for (now) non-public function:
+  # https://github.com/SethMMorton/fastnumbers/issues/43
+  patch -Np1 -i ../"${pkgname}-3.0.0-python3.9.patch"
 }
 
 build() {
@@ -26,15 +35,14 @@
   cd "$pkgname-$pkgver"
   local _py3_ver=$(python --version | cut -d " " -f2)
   export PYTHONPATH="build/lib.linux-$CARCH-${_py3_ver%"."*}:${PYTHONPATH}"
-  py.test
+  pytest -v
 }
 
 package() {
   cd "$pkgname-$pkgver"
   python setup.py install --skip-build \
-    --optimize=1 \
-    --prefix=/usr \
-    --root="${pkgdir}"
+                          --optimize=1 \
+                          --root="${pkgdir}"
   install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
   install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
 }

Added: python-fastnumbers-3.0.0-python3.9.patch
===================================================================
--- python-fastnumbers-3.0.0-python3.9.patch	                        (rev 0)
+++ python-fastnumbers-3.0.0-python3.9.patch	2020-11-19 20:07:55 UTC (rev 757718)
@@ -0,0 +1,13 @@
+diff -ruN a/include/fastnumbers/numbers.h b/include/fastnumbers/numbers.h
+--- a/include/fastnumbers/numbers.h	2020-01-07 05:01:44.000000000 +0100
++++ b/include/fastnumbers/numbers.h	2020-11-19 20:59:35.905868338 +0100
+@@ -6,6 +6,9 @@
+  */
+ 
+ #include <Python.h>
++#define Py_BUILD_CORE
++#include <internal/pycore_dtoa.h>
++#undef Py_BUILD_CORE
+ #include <limits.h>
+ #include "fastnumbers/fn_bool.h"
+ #include "fastnumbers/options.h"



More information about the arch-commits mailing list