[arch-commits] Commit in python-pint/trunk (PKGBUILD python-3.8.patch)
Felix Yan
felixonmars at archlinux.org
Wed Jan 8 19:52:02 UTC 2020
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
===================================================================
--- PKGBUILD 2020-01-08 19:51:58 UTC (rev 550553)
+++ PKGBUILD 2020-01-08 19:52:01 UTC (rev 550554)
@@ -2,29 +2,26 @@
# Contributor: Matthew Sloan matthew at 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'
- '8a2a6d8c3c82471b18f262d65ac8194c3deeee49cd1751892210ea2d6a0e8d4502c97aae70135ae6ca9a92524598475bab0ef50cfa3b9594987e7c75a492722e')
+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.patch 2020-01-08 19:51:58 UTC (rev 550553)
+++ python-3.8.patch 2020-01-08 19:52:01 UTC (rev 550554)
@@ -1,50 +0,0 @@
-From fb7ace52712958a512470c909b3ccf448620a166 Mon Sep 17 00:00:00 2001
-From: xtreak <tir.karthi at gmail.com>
-Date: Sat, 29 Jun 2019 04:58:59 +0000
-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):
-
More information about the arch-commits
mailing list