Date: Tuesday, February 7, 2023 @ 21:05:06
  Author: felixonmars
Revision: 1396028

archrelease: copy trunk to community-any

Added:
  python-sure/repos/community-any/PKGBUILD
    (from rev 1396027, python-sure/trunk/PKGBUILD)
  python-sure/repos/community-any/use-unittest-mock.diff
    (from rev 1396027, python-sure/trunk/use-unittest-mock.diff)
Deleted:
  python-sure/repos/community-any/PKGBUILD
  python-sure/repos/community-any/python310.diff
  python-sure/repos/community-any/use-unittest-mock.diff

------------------------+
 PKGBUILD               |   92 ++++++++++++++++++++++-------------------------
 python310.diff         |   13 ------
 use-unittest-mock.diff |   84 +++++++++++++++++++++---------------------
 3 files changed, 86 insertions(+), 103 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-07 21:04:54 UTC (rev 1396027)
+++ PKGBUILD    2023-02-07 21:05:06 UTC (rev 1396028)
@@ -1,48 +0,0 @@
-# Maintainer: Felix Yan <[email protected]>
-# Maintainer: Chih-Hsuan Yen <[email protected]>
-
-pkgname=python-sure
-pkgver=2.0.0
-pkgrel=5
-pkgdesc="An idiomatic testing library for python with powerful and flexible 
assertions"
-arch=('any')
-url="https://github.com/gabrielfalcao/sure";
-license=('GPL')
-depends=('python-six')
-makedepends=('python-setuptools' 'git')
-# python-nose is still imported in some tests 
https://github.com/gabrielfalcao/sure/issues/182
-checkdepends=('python-pytest' 'python-nose')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/gabrielfalcao/sure/archive/$pkgver.tar.gz";
-        "python310.diff"
-        "use-unittest-mock.diff")
-sha512sums=('d113b08afd63c379ec9f05169b1ad15f3bb616a1f6ad7d0ef6513e98ba7ebb7462254b2d25307906d9f63603fed4f9e4b83ccbca0ec53a2b483f9395fa0fb94a'
-            
'0703cc88d01928e25e94e92fc0cfee68c6759322c9ee1d1603f381b6d67d6cf9db97f26aad1ccf7f6d6702370bc2c0194245aa3ba1c1b1384027a5712e469139'
-            
'ad17f0bc171058cc488f844a55bd0cf2f83b391c6c47b4ac1864b5de0d0842eb086dd1413c249a05684a45c67542c15eadfa2a7cdff095669e327d0e80f09183')
-
-prepare() {
-  export LC_CTYPE=en_US.UTF-8
-
-  cd "$srcdir"/sure-$pkgver
-  # https://github.com/gabrielfalcao/sure/issues/169
-  patch -Np1 -i ../python310.diff
-
-  # Based on the first two commits in 
https://github.com/gabrielfalcao/sure/pull/161
-  patch -Np1 -i ../use-unittest-mock.diff
-
-  sed -i 's#--cov=sure##' setup.cfg
-}
-
-build() {
-  cd "$srcdir"/sure-$pkgver
-  python setup.py build
-}
-
-check() {
-  cd "$srcdir"/sure-$pkgver
-  PYTHONPATH="$PWD" pytest
-}
-
-package() {
-  cd sure-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-}

Copied: python-sure/repos/community-any/PKGBUILD (from rev 1396027, 
python-sure/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-02-07 21:05:06 UTC (rev 1396028)
@@ -0,0 +1,44 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Chih-Hsuan Yen <[email protected]>
+
+pkgname=python-sure
+pkgver=2.0.1
+_commit=84a45bf91fde2e4b922fb126a9f45651be9393fb
+pkgrel=1
+pkgdesc="An idiomatic testing library for python with powerful and flexible 
assertions"
+arch=('any')
+url="https://github.com/gabrielfalcao/sure";
+license=('GPL')
+depends=('python-six')
+makedepends=('python-setuptools' 'git')
+# python-nose is still imported in some tests 
https://github.com/gabrielfalcao/sure/issues/182
+checkdepends=('python-pytest' 'python-nose')
+source=("git+https://github.com/gabrielfalcao/sure.git#commit=$_commit";
+        "use-unittest-mock.diff")
+sha512sums=('SKIP'
+            
'ad17f0bc171058cc488f844a55bd0cf2f83b391c6c47b4ac1864b5de0d0842eb086dd1413c249a05684a45c67542c15eadfa2a7cdff095669e327d0e80f09183')
+
+prepare() {
+  export LC_CTYPE=en_US.UTF-8
+
+  cd sure
+  # Based on the first two commits in 
https://github.com/gabrielfalcao/sure/pull/161
+  patch -Np1 -i ../use-unittest-mock.diff
+
+  sed -i 's#--cov=sure##' setup.cfg
+}
+
+build() {
+  cd sure
+  python setup.py build
+}
+
+check() {
+  cd sure
+  PYTHONPATH="$PWD" pytest
+}
+
+package() {
+  cd sure
+  python setup.py install --root="$pkgdir" --optimize=1
+}

Deleted: python310.diff
===================================================================
--- python310.diff      2023-02-07 21:04:54 UTC (rev 1396027)
+++ python310.diff      2023-02-07 21:05:06 UTC (rev 1396028)
@@ -1,13 +0,0 @@
-diff --git a/sure/__init__.py b/sure/__init__.py
-index ef50bd4..d4c2afb 100644
---- a/sure/__init__.py
-+++ b/sure/__init__.py
-@@ -126,7 +126,7 @@ class CallBack(object):
-             err = traceback.format_exc().splitlines()[-1]
-             err = err.replace("{0}:".format(exc_klass.__name__), "").strip()
- 
--            if err.startswith(self.callback_name) and (
-+            if self.callback_name in err and (
-                 "takes no arguments (1 given)" in err
-                 or "takes 0 positional arguments but 1 was given" in err
-             ):

Deleted: use-unittest-mock.diff
===================================================================
--- use-unittest-mock.diff      2023-02-07 21:04:54 UTC (rev 1396027)
+++ use-unittest-mock.diff      2023-02-07 21:05:06 UTC (rev 1396028)
@@ -1,42 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 016a14b..b208b3d 100755
---- a/setup.py
-+++ b/setup.py
-@@ -81,7 +81,7 @@ def read_readme():
-         return __doc__
- 
- 
--install_requires = ["mock", "six"]
-+install_requires = ["six"]
- tests_require = ["nose"]
- version = read_version()
- 
-diff --git a/sure/core.py b/sure/core.py
-index da59e7c..76e9c9e 100644
---- a/sure/core.py
-+++ b/sure/core.py
-@@ -21,7 +21,10 @@ import os
- try:
-     from mock import _CallList
- except ImportError:
--    from mock.mock import _CallList
-+    try:
-+        from mock.mock import _CallList
-+    except ImportError:
-+        from unittest.mock import _CallList
- 
- import inspect
- from six import (
-diff --git a/tests/test_assertion_builder.py b/tests/test_assertion_builder.py
-index 9ce637f..6e33aa8 100644
---- a/tests/test_assertion_builder.py
-+++ b/tests/test_assertion_builder.py
-@@ -17,7 +17,7 @@
- # along with this program.  If not, see <http://www.gnu.org/licenses/>.
- from __future__ import unicode_literals
- import re
--import mock
-+from unittest import mock
- from collections import OrderedDict
- 
- from datetime import datetime, timedelta

Copied: python-sure/repos/community-any/use-unittest-mock.diff (from rev 
1396027, python-sure/trunk/use-unittest-mock.diff)
===================================================================
--- use-unittest-mock.diff                              (rev 0)
+++ use-unittest-mock.diff      2023-02-07 21:05:06 UTC (rev 1396028)
@@ -0,0 +1,42 @@
+diff --git a/setup.py b/setup.py
+index 016a14b..b208b3d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -81,7 +81,7 @@ def read_readme():
+         return __doc__
+ 
+ 
+-install_requires = ["mock", "six"]
++install_requires = ["six"]
+ tests_require = ["nose"]
+ version = read_version()
+ 
+diff --git a/sure/core.py b/sure/core.py
+index da59e7c..76e9c9e 100644
+--- a/sure/core.py
++++ b/sure/core.py
+@@ -21,7 +21,10 @@ import os
+ try:
+     from mock import _CallList
+ except ImportError:
+-    from mock.mock import _CallList
++    try:
++        from mock.mock import _CallList
++    except ImportError:
++        from unittest.mock import _CallList
+ 
+ import inspect
+ from six import (
+diff --git a/tests/test_assertion_builder.py b/tests/test_assertion_builder.py
+index 9ce637f..6e33aa8 100644
+--- a/tests/test_assertion_builder.py
++++ b/tests/test_assertion_builder.py
+@@ -17,7 +17,7 @@
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ from __future__ import unicode_literals
+ import re
+-import mock
++from unittest import mock
+ from collections import OrderedDict
+ 
+ from datetime import datetime, timedelta

Reply via email to