[arch-commits] Commit in python-pint/trunk (PKGBUILD python-3.8.patch)

2020-01-08 Thread Felix Yan via arch-commits
Date: Wednesday, January 8, 2020 @ 19:52:01
  Author: felixonmars
Revision: 550554

upgpkg: python-pint 0.10-1

Modified:
  python-pint/trunk/PKGBUILD
Deleted:
  python-pint/trunk/python-3.8.patch

--+
 PKGBUILD |   19 ---
 python-3.8.patch |   50 --
 2 files changed, 8 insertions(+), 61 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-01-08 19:51:58 UTC (rev 550553)
+++ PKGBUILD2020-01-08 19:52:01 UTC (rev 550554)
@@ -2,29 +2,26 @@
 # Contributor: Matthew Sloan matt...@sloan.cc
 
 pkgname=python-pint
-pkgver=0.9
-pkgrel=3
+pkgver=0.10
+pkgrel=1
 pkgdesc="A unit library for Python"
 arch=('any')
 license=('BSD')
 url="https://pint.readthedocs.org;
 depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-numpy' 'python-uncertainties')
-source=("https://pypi.io/packages/source/P/Pint/Pint-$pkgver.tar.gz;
-python-3.8.patch)
-sha512sums=('d79e0ff6377393f9dd8ce6a938440e8ed3c947642716974a3d69461d75776a39677d6651e6c081076f31e67a7dbffeb2fded42e61c9975f814b5eb24ab626fb6'
-
'8a2a6d8c3c82471b18f262d65ac8194c3d49cd1751892210ea2d6a0e8d4502c97aae70135ae6ca9a92524598475bab0ef50cfa3b9594987e7c75a492722e')
+makedepends=('python-setuptools-scm')
+checkdepends=('python-pytest-runner' 'python-numpy' 'python-uncertainties')
+source=("https://pypi.io/packages/source/P/Pint/Pint-$pkgver.tar.gz;)
+sha512sums=('716f7ed89e37eb4fd4062e34bf0735a5476723b38e5c6d7ff14dee8ba97bd6541ca71f60da99d10c6d15667ea5f661ae7df26aaa6cd17f09dafd689b80b2fab2')
 
 prepare() {
   cd Pint-$pkgver
-  # https://github.com/hgrecco/pint/pull/824
-  patch -Np1 -i ../python-3.8.patch
+  sed -i 's/pkg_resources.extern.//' pint/quantity.py
 }
 
 check() {
   cd Pint-$pkgver
-  python setup.py test
+  python setup.py pytest
 }
 
 package() {

Deleted: python-3.8.patch
===
--- python-3.8.patch2020-01-08 19:51:58 UTC (rev 550553)
+++ python-3.8.patch2020-01-08 19:52:01 UTC (rev 550554)
@@ -1,50 +0,0 @@
-From fb7ace52712958a512470c909b3ccf448620a166 Mon Sep 17 00:00:00 2001
-From: xtreak 
-Date: Sat, 29 Jun 2019 04:58:59 +
-Subject: [PATCH] Use context manager for assertWarns and fix
- DeprecationWarning
-

- pint/testsuite/parameterized.py | 7 ++-
- pint/testsuite/test_quantity.py | 3 ++-
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/pint/testsuite/parameterized.py b/pint/testsuite/parameterized.py
-index 9b92037..7c45915 100644
 a/pint/testsuite/parameterized.py
-+++ b/pint/testsuite/parameterized.py
-@@ -32,6 +32,11 @@ from functools import wraps
- import collections
- import unittest
- 
-+try:
-+from collections.abc import Callable
-+except ImportError:
-+from collections import Callable
-+
- def add_metaclass(metaclass):
- """Class decorator for creating a class with a metaclass."""
- def wrapper(cls):
-@@ -69,7 +74,7 @@ class ParameterizedTestCaseMetaClass(type):
- new_class_dict = {}
- 
- for attr_name, attr_value in list(class_dict.items()):
--if isinstance(attr_value, collections.Callable) and 
hasattr(attr_value, 'param_names'):
-+if isinstance(attr_value, Callable) and hasattr(attr_value, 
'param_names'):
- # print("Processing attr_name = %r; attr_value = %r" % (
- # attr_name, attr_value))
- 
-diff --git a/pint/testsuite/test_quantity.py b/pint/testsuite/test_quantity.py
-index c7f41cb..89f8776 100644
 a/pint/testsuite/test_quantity.py
-+++ b/pint/testsuite/test_quantity.py
-@@ -416,7 +416,8 @@ class TestQuantityToCompact(QuantityTestCase):
- def test_nonnumeric_magnitudes(self):
- ureg = self.ureg
- x = "some string"*ureg.m
--self.assertRaises(RuntimeError, self.compareQuantity_compact(x,x))
-+with self.assertWarns(RuntimeWarning):
-+self.compareQuantity_compact(x,x)
- 
- class TestQuantityBasicMath(QuantityTestCase):
- 


[arch-commits] Commit in python-pint/trunk (PKGBUILD python-3.8.patch)

2019-11-04 Thread Evangelos Foutras via arch-commits
Date: Monday, November 4, 2019 @ 17:12:09
  Author: foutrelis
Revision: 524106

Python 3.8 rebuild

Added:
  python-pint/trunk/python-3.8.patch
Modified:
  python-pint/trunk/PKGBUILD

--+
 PKGBUILD |   14 +++---
 python-3.8.patch |   50 ++
 2 files changed, 61 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2019-11-04 16:56:29 UTC (rev 524105)
+++ PKGBUILD2019-11-04 17:12:09 UTC (rev 524106)
@@ -3,7 +3,7 @@
 
 pkgname=python-pint
 pkgver=0.9
-pkgrel=2
+pkgrel=3
 pkgdesc="A unit library for Python"
 arch=('any')
 license=('BSD')
@@ -11,9 +11,17 @@
 depends=('python')
 makedepends=('python-setuptools')
 checkdepends=('python-numpy' 'python-uncertainties')
-source=("https://pypi.io/packages/source/P/Pint/Pint-$pkgver.tar.gz;)
-sha512sums=('d79e0ff6377393f9dd8ce6a938440e8ed3c947642716974a3d69461d75776a39677d6651e6c081076f31e67a7dbffeb2fded42e61c9975f814b5eb24ab626fb6')
+source=("https://pypi.io/packages/source/P/Pint/Pint-$pkgver.tar.gz;
+python-3.8.patch)
+sha512sums=('d79e0ff6377393f9dd8ce6a938440e8ed3c947642716974a3d69461d75776a39677d6651e6c081076f31e67a7dbffeb2fded42e61c9975f814b5eb24ab626fb6'
+
'8a2a6d8c3c82471b18f262d65ac8194c3d49cd1751892210ea2d6a0e8d4502c97aae70135ae6ca9a92524598475bab0ef50cfa3b9594987e7c75a492722e')
 
+prepare() {
+  cd Pint-$pkgver
+  # https://github.com/hgrecco/pint/pull/824
+  patch -Np1 -i ../python-3.8.patch
+}
+
 check() {
   cd Pint-$pkgver
   python setup.py test

Added: python-3.8.patch
===
--- python-3.8.patch(rev 0)
+++ python-3.8.patch2019-11-04 17:12:09 UTC (rev 524106)
@@ -0,0 +1,50 @@
+From fb7ace52712958a512470c909b3ccf448620a166 Mon Sep 17 00:00:00 2001
+From: xtreak 
+Date: Sat, 29 Jun 2019 04:58:59 +
+Subject: [PATCH] Use context manager for assertWarns and fix
+ DeprecationWarning
+
+---
+ pint/testsuite/parameterized.py | 7 ++-
+ pint/testsuite/test_quantity.py | 3 ++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/pint/testsuite/parameterized.py b/pint/testsuite/parameterized.py
+index 9b92037..7c45915 100644
+--- a/pint/testsuite/parameterized.py
 b/pint/testsuite/parameterized.py
+@@ -32,6 +32,11 @@ from functools import wraps
+ import collections
+ import unittest
+ 
++try:
++from collections.abc import Callable
++except ImportError:
++from collections import Callable
++
+ def add_metaclass(metaclass):
+ """Class decorator for creating a class with a metaclass."""
+ def wrapper(cls):
+@@ -69,7 +74,7 @@ class ParameterizedTestCaseMetaClass(type):
+ new_class_dict = {}
+ 
+ for attr_name, attr_value in list(class_dict.items()):
+-if isinstance(attr_value, collections.Callable) and 
hasattr(attr_value, 'param_names'):
++if isinstance(attr_value, Callable) and hasattr(attr_value, 
'param_names'):
+ # print("Processing attr_name = %r; attr_value = %r" % (
+ # attr_name, attr_value))
+ 
+diff --git a/pint/testsuite/test_quantity.py b/pint/testsuite/test_quantity.py
+index c7f41cb..89f8776 100644
+--- a/pint/testsuite/test_quantity.py
 b/pint/testsuite/test_quantity.py
+@@ -416,7 +416,8 @@ class TestQuantityToCompact(QuantityTestCase):
+ def test_nonnumeric_magnitudes(self):
+ ureg = self.ureg
+ x = "some string"*ureg.m
+-self.assertRaises(RuntimeError, self.compareQuantity_compact(x,x))
++with self.assertWarns(RuntimeWarning):
++self.compareQuantity_compact(x,x)
+ 
+ class TestQuantityBasicMath(QuantityTestCase):
+