[arch-commits] Commit in python-pyrsistent/repos/community-x86_64 (5 files)

Felix Yan felixonmars at archlinux.org
Sat Feb 9 18:50:49 UTC 2019


    Date: Saturday, February 9, 2019 @ 18:50:47
  Author: felixonmars
Revision: 430938

archrelease: copy trunk to community-x86_64

Added:
  python-pyrsistent/repos/community-x86_64/LICENCE.mit
    (from rev 430937, python-pyrsistent/trunk/LICENCE.mit)
  python-pyrsistent/repos/community-x86_64/PKGBUILD
    (from rev 430937, python-pyrsistent/trunk/PKGBUILD)
  python-pyrsistent/repos/community-x86_64/hypothesis-4.patch
    (from rev 430937, python-pyrsistent/trunk/hypothesis-4.patch)
Deleted:
  python-pyrsistent/repos/community-x86_64/LICENCE.mit
  python-pyrsistent/repos/community-x86_64/PKGBUILD

--------------------+
 LICENCE.mit        |   44 +++++++--------
 PKGBUILD           |  108 +++++++++++++++++++-------------------
 hypothesis-4.patch |  144 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 222 insertions(+), 74 deletions(-)

Deleted: LICENCE.mit
===================================================================
--- LICENCE.mit	2019-02-09 18:50:25 UTC (rev 430937)
+++ LICENCE.mit	2019-02-09 18:50:47 UTC (rev 430938)
@@ -1,22 +0,0 @@
-Copyright (c) 2015 Tobias Gustafsson
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

Copied: python-pyrsistent/repos/community-x86_64/LICENCE.mit (from rev 430937, python-pyrsistent/trunk/LICENCE.mit)
===================================================================
--- LICENCE.mit	                        (rev 0)
+++ LICENCE.mit	2019-02-09 18:50:47 UTC (rev 430938)
@@ -0,0 +1,22 @@
+Copyright (c) 2015 Tobias Gustafsson
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-02-09 18:50:25 UTC (rev 430937)
+++ PKGBUILD	2019-02-09 18:50:47 UTC (rev 430938)
@@ -1,52 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-pyrsistent
-pkgname=('python-pyrsistent' 'python2-pyrsistent')
-pkgver=0.14.9
-pkgrel=1
-pkgdesc="Persistent/Functional/Immutable data structures"
-arch=('x86_64')
-license=('MIT')
-url="https://github.com/tobgu/pyrsistent"
-makedepends=('python-setuptools' 'python2-setuptools')
-checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-hypothesis' 'python2-hypothesis')
-source=("https://pypi.io/packages/source/p/pyrsistent/pyrsistent-$pkgver.tar.gz"
-        LICENCE.mit)
-sha512sums=('bdf36228f80ce1d018d5baadae5cfb5aa3d9fddcd5144dc644cd6e9fd8d315ecb9ec8c48a8fb9ef73b4af6fceb28f1b83020cc3b4138abb5728ba24cdbf03d8f'
-            '036bd5cc2a62b004576ecc50a84dc7d187d8108f52cb886f7e32bed324327af2dc132100e1c8f1dd2ce35b774f74898020f04a315e5137319deda18a449e791a')
-
-prepare() {
-  cp -a pyrsistent-$pkgver{,-py2}
-}
-
-build() {
-  cd "$srcdir"/pyrsistent-$pkgver
-  python setup.py build
-
-  cd "$srcdir"/pyrsistent-$pkgver-py2
-  python2 setup.py build
-}
-
-check() {
-  cd "$srcdir"/pyrsistent-$pkgver
-  python setup.py pytest
-
-  cd "$srcdir"/pyrsistent-$pkgver-py2
-  python2 setup.py pytest
-}
-
-package_python-pyrsistent() {
-  depends=('python-six')
-
-  cd pyrsistent-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -D -m644 ../LICENCE.mit "$pkgdir"/usr/share/licenses/$pkgname/LICENCE.mit
-}
-
-package_python2-pyrsistent() {
-  depends=('python2-six')
-
-  cd pyrsistent-$pkgver-py2
-  python2 setup.py install --root="$pkgdir" --optimize=1
-  install -D -m644 ../LICENCE.mit "$pkgdir"/usr/share/licenses/$pkgname/LICENCE.mit
-}

Copied: python-pyrsistent/repos/community-x86_64/PKGBUILD (from rev 430937, python-pyrsistent/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-02-09 18:50:47 UTC (rev 430938)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pyrsistent
+pkgname=('python-pyrsistent' 'python2-pyrsistent')
+pkgver=0.14.10
+pkgrel=1
+pkgdesc="Persistent/Functional/Immutable data structures"
+arch=('x86_64')
+license=('MIT')
+url="https://github.com/tobgu/pyrsistent"
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-hypothesis' 'python2-hypothesis')
+source=("https://pypi.io/packages/source/p/pyrsistent/pyrsistent-$pkgver.tar.gz"
+        LICENCE.mit
+        hypothesis-4.patch)
+sha512sums=('7a02c01321b6b0e4b2397a1322588539e54f189c574f05450794961c5078f04a70c7975f67885fedf2254a5e7da8f9aaaf55493667d5ec2a4af1147db48e8e34'
+            '036bd5cc2a62b004576ecc50a84dc7d187d8108f52cb886f7e32bed324327af2dc132100e1c8f1dd2ce35b774f74898020f04a315e5137319deda18a449e791a'
+            '0c06dc8bee3fda86b6e733f7782d3337dc35bc6cfe4603e8ecd2958aad6127461fe8e821693e80c044df08683a29b7ab1a1ee412b4903fdd5f296f83a95685ce')
+
+prepare() {
+  patch -d pyrsistent-$pkgver -p1 -i ../hypothesis-4.patch
+  sed -i 's/< *4/<6/' pyrsistent-$pkgver/setup.py
+  cp -a pyrsistent-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/pyrsistent-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/pyrsistent-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/pyrsistent-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/pyrsistent-$pkgver-py2
+  python2 setup.py pytest
+}
+
+package_python-pyrsistent() {
+  depends=('python-six')
+
+  cd pyrsistent-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 ../LICENCE.mit "$pkgdir"/usr/share/licenses/$pkgname/LICENCE.mit
+}
+
+package_python2-pyrsistent() {
+  depends=('python2-six')
+
+  cd pyrsistent-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 ../LICENCE.mit "$pkgdir"/usr/share/licenses/$pkgname/LICENCE.mit
+}

Copied: python-pyrsistent/repos/community-x86_64/hypothesis-4.patch (from rev 430937, python-pyrsistent/trunk/hypothesis-4.patch)
===================================================================
--- hypothesis-4.patch	                        (rev 0)
+++ hypothesis-4.patch	2019-02-09 18:50:47 UTC (rev 430938)
@@ -0,0 +1,144 @@
+diff --git a/tests/hypothesis_vector_test.py b/tests/hypothesis_vector_test.py
+index 93ff0b8..e634204 100644
+--- a/tests/hypothesis_vector_test.py
++++ b/tests/hypothesis_vector_test.py
+@@ -45,7 +45,7 @@ def test_setup(gc_when_done):
+ 
+ 
+ # Pairs of a list and corresponding pvector:
+-PVectorAndLists = st.lists(st.builds(TestObject), average_size=5).map(
++PVectorAndLists = st.lists(st.builds(TestObject)).map(
+     lambda l: (l, pvector(l)))
+ 
+ 
+@@ -123,70 +123,70 @@ class PVectorBuilder(RuleBasedStateMachine):
+         l3.extend(l2)
+         return l3, pv.extend(pv2)
+ 
+-    @rule(target=sequences, former=sequences, choice=st.choices())
++    @rule(target=sequences, former=sequences, data=st.data())
+     @verify_inputs_unmodified
+-    def remove(self, former, choice):
++    def remove(self, former, data):
+         """
+         Remove an item from the sequences.
+         """
+         l, pv = former
+         assume(l)
+         l2 = l[:]
+-        i = choice(range(len(l)))
++        i = data.draw(st.sampled_from(range(len(l))))
+         del l2[i]
+         return l2, pv.delete(i)
+ 
+-    @rule(target=sequences, former=sequences, choice=st.choices())
++    @rule(target=sequences, former=sequences, data=st.data())
+     @verify_inputs_unmodified
+-    def set(self, former, choice):
++    def set(self, former, data):
+         """
+         Overwrite an item in the sequence.
+         """
+         l, pv = former
+         assume(l)
+         l2 = l[:]
+-        i = choice(range(len(l)))
++        i = data.draw(st.sampled_from(range(len(l))))
+         obj = TestObject()
+         l2[i] = obj
+         return l2, pv.set(i, obj)
+ 
+-    @rule(target=sequences, former=sequences, choice=st.choices())
++    @rule(target=sequences, former=sequences, data=st.data())
+     @verify_inputs_unmodified
+-    def transform_set(self, former, choice):
++    def transform_set(self, former, data):
+         """
+         Transform the sequence by setting value.
+         """
+         l, pv = former
+         assume(l)
+         l2 = l[:]
+-        i = choice(range(len(l)))
++        i = data.draw(st.sampled_from(range(len(l))))
+         obj = TestObject()
+         l2[i] = obj
+         return l2, pv.transform([i], obj)
+ 
+-    @rule(target=sequences, former=sequences, choice=st.choices())
++    @rule(target=sequences, former=sequences, data=st.data())
+     @verify_inputs_unmodified
+-    def transform_discard(self, former, choice):
++    def transform_discard(self, former, data):
+         """
+         Transform the sequence by discarding a value.
+         """
+         l, pv = former
+         assume(l)
+         l2 = l[:]
+-        i = choice(range(len(l)))
++        i = data.draw(st.sampled_from(range(len(l))))
+         del l2[i]
+         return l2, pv.transform([i], discard)
+ 
+-    @rule(target=sequences, former=sequences, choice=st.choices())
++    @rule(target=sequences, former=sequences, data=st.data())
+     @verify_inputs_unmodified
+-    def subset(self, former, choice):
++    def subset(self, former, data):
+         """
+         A subset of the previous sequence.
+         """
+         l, pv = former
+         assume(l)
+-        i = choice(range(len(l)))
+-        j = choice(range(len(l)))
++        i = data.draw(st.sampled_from(range(len(l))))
++        j = data.draw(st.sampled_from(range(len(l))))
+         return l[i:j], pv[i:j]
+ 
+     @rule(pair=sequences)
+@@ -250,34 +250,34 @@ class PVectorEvolverBuilder(RuleBasedStateMachine):
+         start.current_evolver.extend(end.current_list)
+         start.current_list.extend(end.current_list)
+ 
+-    @rule(item=sequences, choice=st.choices())
+-    def delete(self, item, choice):
++    @rule(item=sequences, data=st.data())
++    def delete(self, item, data):
+         """
+         Remove an item from the sequences.
+         """
+         assume(item.current_list)
+-        i = choice(range(len(item.current_list)))
++        i = data.draw(st.sampled_from(range(len(item.current_list))))
+         del item.current_list[i]
+         del item.current_evolver[i]
+ 
+-    @rule(item=sequences, choice=st.choices())
+-    def setitem(self, item, choice):
++    @rule(item=sequences, data=st.data())
++    def setitem(self, item, data):
+         """
+         Overwrite an item in the sequence using ``__setitem__``.
+         """
+         assume(item.current_list)
+-        i = choice(range(len(item.current_list)))
++        i = data.draw(st.sampled_from(range(len(item.current_list))))
+         obj = TestObject()
+         item.current_list[i] = obj
+         item.current_evolver[i] = obj
+ 
+-    @rule(item=sequences, choice=st.choices())
+-    def set(self, item, choice):
++    @rule(item=sequences, data=st.data())
++    def set(self, item, data):
+         """
+         Overwrite an item in the sequence using ``set``.
+         """
+         assume(item.current_list)
+-        i = choice(range(len(item.current_list)))
++        i = data.draw(st.sampled_from(range(len(item.current_list))))
+         obj = TestObject()
+         item.current_list[i] = obj
+         item.current_evolver.set(i, obj)



More information about the arch-commits mailing list