[arch-commits] Commit in python-iniconfig/repos/community-staging-any (3 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 1 15:37:21 UTC 2019


    Date: Friday, November 1, 2019 @ 15:37:21
  Author: felixonmars
Revision: 522052

archrelease: copy trunk to community-staging-any

Added:
  python-iniconfig/repos/community-staging-any/PKGBUILD
    (from rev 522051, python-iniconfig/trunk/PKGBUILD)
  python-iniconfig/repos/community-staging-any/pytest5.patch
    (from rev 522051, python-iniconfig/trunk/pytest5.patch)
Deleted:
  python-iniconfig/repos/community-staging-any/PKGBUILD

---------------+
 PKGBUILD      |  109 ++++++++++++++++++++++++++++----------------------------
 pytest5.patch |   54 +++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 53 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-01 15:37:05 UTC (rev 522051)
+++ PKGBUILD	2019-11-01 15:37:21 UTC (rev 522052)
@@ -1,53 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-iniconfig
-pkgname=(python-iniconfig python2-iniconfig)
-pkgver=1.0.0
-pkgrel=3
-pkgdesc="brain-dead simple config-ini parsing"
-url="https://github.com/RonnyPfannschmidt/iniconfig"
-license=('MIT')
-arch=('any')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-setuptools-scm'
-             'python2-setuptools-scm')
-checkdepends=('python-pytest-runner' 'python2-pytest-runner')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/RonnyPfannschmidt/iniconfig/archive/v$pkgver.tar.gz")
-sha512sums=('d8048af40145a5312784c5d1a9afaa052528ffdef56e47aa9be7f727d946426a43b8e934edce6b46024b83771c151ef544787e8422c74adeda2ccc8913aedd5c')
-
-prepare() {
-  cp -a iniconfig-$pkgver{,-py2}
-
-  export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
-}
-
-build() {
-  cd "$srcdir"/iniconfig-$pkgver
-  python setup.py build
-
-  cd "$srcdir"/iniconfig-$pkgver-py2
-  python2 setup.py build
-}
-
-check() {
-  cd "$srcdir"/iniconfig-$pkgver
-  python setup.py pytest
-
-  cd "$srcdir"/iniconfig-$pkgver-py2
-  python2 setup.py pytest
-}
-
-package_python-iniconfig() {
-  depends=('python')
-
-  cd iniconfig-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-package_python2-iniconfig() {
-  depends=('python2')
-
-  cd iniconfig-$pkgver-py2
-  python2 setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}

Copied: python-iniconfig/repos/community-staging-any/PKGBUILD (from rev 522051, python-iniconfig/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-11-01 15:37:21 UTC (rev 522052)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-iniconfig
+pkgname=(python-iniconfig python2-iniconfig)
+pkgver=1.0.0
+pkgrel=4
+pkgdesc="brain-dead simple config-ini parsing"
+url="https://github.com/RonnyPfannschmidt/iniconfig"
+license=('MIT')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-setuptools-scm'
+             'python2-setuptools-scm')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/RonnyPfannschmidt/iniconfig/archive/v$pkgver.tar.gz"
+        'pytest5.patch')
+sha512sums=('d8048af40145a5312784c5d1a9afaa052528ffdef56e47aa9be7f727d946426a43b8e934edce6b46024b83771c151ef544787e8422c74adeda2ccc8913aedd5c'
+            'db500dcdbc358db130569c8f7a199e34b37a4f0693dc99064fdcc4f7968048f118f942bed84332c4399fea9f64d1d84ed5e3502ba26e48e7290d2ca31ea87638')
+
+prepare() {
+  patch -Np1 -d iniconfig-$pkgver <pytest5.patch
+  cp -a iniconfig-$pkgver{,-py2}
+
+  export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+}
+
+build() {
+  cd "$srcdir"/iniconfig-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/iniconfig-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/iniconfig-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/iniconfig-$pkgver-py2
+  python2 setup.py pytest
+}
+
+package_python-iniconfig() {
+  depends=('python')
+
+  cd iniconfig-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-iniconfig() {
+  depends=('python2')
+
+  cd iniconfig-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Copied: python-iniconfig/repos/community-staging-any/pytest5.patch (from rev 522051, python-iniconfig/trunk/pytest5.patch)
===================================================================
--- pytest5.patch	                        (rev 0)
+++ pytest5.patch	2019-11-01 15:37:21 UTC (rev 522052)
@@ -0,0 +1,54 @@
+From 41076a67c333d96be14557ecbb29995f98744bd7 Mon Sep 17 00:00:00 2001
+From: Stanislav Levin <slev at altlinux.org>
+Date: Thu, 8 Aug 2019 19:43:12 +0300
+Subject: [PATCH] Fix Pytest 5 errors
+
+This fixes
+"""
+pytest.PytestDeprecationWarning: raises(..., 'code(as_a_string)')
+is deprecated, use the context manager form or use `exec()` directly.
+"""
+
+Fixes: https://github.com/RonnyPfannschmidt/iniconfig/issues/6
+Signed-off-by: Stanislav Levin <slev at altlinux.org>
+---
+ test_iniconfig.py | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/test_iniconfig.py b/test_iniconfig.py
+index 27fd53f..fe12421 100644
+--- a/test_iniconfig.py
++++ b/test_iniconfig.py
+@@ -150,27 +150,25 @@ def test_iniconfig_from_file(tmpdir):
+     assert list(config.sections) == ['metadata']
+     config = IniConfig(path, "[diff]")
+     assert list(config.sections) == ['diff']
+-    py.test.raises(TypeError, "IniConfig(data=path.read())")
++    with pytest.raises(TypeError):
++        IniConfig(data=path.read())
+ 
+ 
+ def test_iniconfig_section_first(tmpdir):
+-    excinfo = py.test.raises(ParseError, """
++    with pytest.raises(ParseError) as excinfo:
+         IniConfig("x", data='name=1')
+-    """)
+     assert excinfo.value.msg == "no section header defined"
+ 
+ 
+ def test_iniconig_section_duplicate_fails():
+-    excinfo = py.test.raises(ParseError, r"""
++    with pytest.raises(ParseError) as excinfo:
+         IniConfig("x", data='[section]\n[section]')
+-    """)
+     assert 'duplicate section' in str(excinfo.value)
+ 
+ 
+ def test_iniconfig_duplicate_key_fails():
+-    excinfo = py.test.raises(ParseError, r"""
++    with pytest.raises(ParseError) as excinfo:
+         IniConfig("x", data='[section]\nname = Alice\nname = bob')
+-    """)
+ 
+     assert 'duplicate name' in str(excinfo.value)
+ 



More information about the arch-commits mailing list