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

Felix Yan felixonmars at archlinux.org
Thu Nov 12 10:15:51 UTC 2020


    Date: Thursday, November 12, 2020 @ 10:15:51
  Author: felixonmars
Revision: 751512

archrelease: copy trunk to community-staging-any

Added:
  python-pyudev/repos/community-staging-any/0001-tests-fix-tests-for-pytest-4.0.patch
    (from rev 751510, python-pyudev/trunk/0001-tests-fix-tests-for-pytest-4.0.patch)
  python-pyudev/repos/community-staging-any/PKGBUILD
    (from rev 751510, python-pyudev/trunk/PKGBUILD)
Deleted:
  python-pyudev/repos/community-staging-any/0001-tests-fix-tests-for-pytest-4.0.patch
  python-pyudev/repos/community-staging-any/PKGBUILD

-------------------------------------------+
 0001-tests-fix-tests-for-pytest-4.0.patch |  128 ++++++++++++++--------------
 PKGBUILD                                  |  128 ++++++++++++++--------------
 2 files changed, 128 insertions(+), 128 deletions(-)

Deleted: 0001-tests-fix-tests-for-pytest-4.0.patch
===================================================================
--- 0001-tests-fix-tests-for-pytest-4.0.patch	2020-11-12 10:15:50 UTC (rev 751511)
+++ 0001-tests-fix-tests-for-pytest-4.0.patch	2020-11-12 10:15:51 UTC (rev 751512)
@@ -1,64 +0,0 @@
-From cc04bc5ca08e4761b41c5cf220889c4233f157a0 Mon Sep 17 00:00:00 2001
-From: FFY00 <filipe.lains at gmail.com>
-Date: Fri, 24 May 2019 19:08:41 +0100
-Subject: [PATCH] tests: fix tests for pytest 4.0
-
----
- tests/plugins/mock_libudev.py | 6 ++++--
- tests/plugins/privileged.py   | 5 +++--
- tests/plugins/travis.py       | 5 +++--
- 3 files changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/tests/plugins/mock_libudev.py b/tests/plugins/mock_libudev.py
-index aefeb31..0bde07b 100644
---- a/tests/plugins/mock_libudev.py
-+++ b/tests/plugins/mock_libudev.py
-@@ -32,6 +32,7 @@
- from contextlib import contextmanager
- from collections import namedtuple
- 
-+import pytest
- import mock
- 
- Node = namedtuple('Node', 'name value next')
-@@ -93,5 +94,6 @@ def libudev_list(libudev, function, items):
- EXPOSED_FUNCTIONS = [libudev_list]
- 
- 
--def pytest_namespace():
--    return dict((f.__name__, f) for f in EXPOSED_FUNCTIONS)
-+def pytest_configure():
-+    for f in EXPOSED_FUNCTIONS:
-+        setattr(pytest, f.__name__, f)
-diff --git a/tests/plugins/privileged.py b/tests/plugins/privileged.py
-index 92328b9..c636980 100644
---- a/tests/plugins/privileged.py
-+++ b/tests/plugins/privileged.py
-@@ -71,5 +71,6 @@ def unload_dummy():
- EXPOSED_FUNCTIONS = [load_dummy, unload_dummy]
- 
- 
--def pytest_namespace():
--    return dict((f.__name__, f) for f in EXPOSED_FUNCTIONS)
-+def pytest_configure():
-+    for f in EXPOSED_FUNCTIONS:
-+        setattr(pytest, f.__name__, f)
-diff --git a/tests/plugins/travis.py b/tests/plugins/travis.py
-index 46466c2..15a780e 100644
---- a/tests/plugins/travis.py
-+++ b/tests/plugins/travis.py
-@@ -38,8 +38,9 @@ def is_on_travis_ci():
- EXPOSED_FUNCTIONS = [is_on_travis_ci]
- 
- 
--def pytest_namespace():
--    return dict((f.__name__, f) for f in EXPOSED_FUNCTIONS)
-+def pytest_configure():
-+    for f in EXPOSED_FUNCTIONS:
-+        setattr(pytest, f.__name__, f)
- 
- 
- def pytest_runtest_setup(item):
--- 
-2.21.0
-

Copied: python-pyudev/repos/community-staging-any/0001-tests-fix-tests-for-pytest-4.0.patch (from rev 751510, python-pyudev/trunk/0001-tests-fix-tests-for-pytest-4.0.patch)
===================================================================
--- 0001-tests-fix-tests-for-pytest-4.0.patch	                        (rev 0)
+++ 0001-tests-fix-tests-for-pytest-4.0.patch	2020-11-12 10:15:51 UTC (rev 751512)
@@ -0,0 +1,64 @@
+From cc04bc5ca08e4761b41c5cf220889c4233f157a0 Mon Sep 17 00:00:00 2001
+From: FFY00 <filipe.lains at gmail.com>
+Date: Fri, 24 May 2019 19:08:41 +0100
+Subject: [PATCH] tests: fix tests for pytest 4.0
+
+---
+ tests/plugins/mock_libudev.py | 6 ++++--
+ tests/plugins/privileged.py   | 5 +++--
+ tests/plugins/travis.py       | 5 +++--
+ 3 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/tests/plugins/mock_libudev.py b/tests/plugins/mock_libudev.py
+index aefeb31..0bde07b 100644
+--- a/tests/plugins/mock_libudev.py
++++ b/tests/plugins/mock_libudev.py
+@@ -32,6 +32,7 @@
+ from contextlib import contextmanager
+ from collections import namedtuple
+ 
++import pytest
+ import mock
+ 
+ Node = namedtuple('Node', 'name value next')
+@@ -93,5 +94,6 @@ def libudev_list(libudev, function, items):
+ EXPOSED_FUNCTIONS = [libudev_list]
+ 
+ 
+-def pytest_namespace():
+-    return dict((f.__name__, f) for f in EXPOSED_FUNCTIONS)
++def pytest_configure():
++    for f in EXPOSED_FUNCTIONS:
++        setattr(pytest, f.__name__, f)
+diff --git a/tests/plugins/privileged.py b/tests/plugins/privileged.py
+index 92328b9..c636980 100644
+--- a/tests/plugins/privileged.py
++++ b/tests/plugins/privileged.py
+@@ -71,5 +71,6 @@ def unload_dummy():
+ EXPOSED_FUNCTIONS = [load_dummy, unload_dummy]
+ 
+ 
+-def pytest_namespace():
+-    return dict((f.__name__, f) for f in EXPOSED_FUNCTIONS)
++def pytest_configure():
++    for f in EXPOSED_FUNCTIONS:
++        setattr(pytest, f.__name__, f)
+diff --git a/tests/plugins/travis.py b/tests/plugins/travis.py
+index 46466c2..15a780e 100644
+--- a/tests/plugins/travis.py
++++ b/tests/plugins/travis.py
+@@ -38,8 +38,9 @@ def is_on_travis_ci():
+ EXPOSED_FUNCTIONS = [is_on_travis_ci]
+ 
+ 
+-def pytest_namespace():
+-    return dict((f.__name__, f) for f in EXPOSED_FUNCTIONS)
++def pytest_configure():
++    for f in EXPOSED_FUNCTIONS:
++        setattr(pytest, f.__name__, f)
+ 
+ 
+ def pytest_runtest_setup(item):
+-- 
+2.21.0
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-12 10:15:50 UTC (rev 751511)
+++ PKGBUILD	2020-11-12 10:15:51 UTC (rev 751512)
@@ -1,64 +0,0 @@
-# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-# Contributor: examon <examon.mail[at]gmail[dot]com>
-# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
-# Contributor: Dwight Schauer <dschauer at ti.com>
-
-_pkgname=pyudev
-pkgname=python-$_pkgname
-pkgver=0.22
-pkgrel=4
-arch=('any')
-url='https://github.com/pyudev/pyudev'
-license=('LGPL')
-pkgdesc='Python bindings to libudev'
-depends=('python-six' 'systemd')
-makedepends=('python-setuptools' 'python-sphinx' 'python-mock')
-checkdepends=('python-pytest-runner' 'python-docutils' 'python-mock' 'python-hypothesis')
-optdepends=('python-pyqt5: PyQt integration'
-            'pyside2: PySide integration'
-            'python-wxpython: WX integration')
-source=("$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
-sha512sums=('b509f4442e1c11eea9755fbae867b0aee97221db60d78ed2b8da40c39fb11015982b2e9b423680ed44b3f9db2c84b3a0a57a1e8aad4fb939061e33646638d9e3')
-
-prepare() {
-  cd $_pkgname-$pkgver
-
-  # pytest-runner doesn't understand norecursedirs
-  sed -i '/norecursedirs/d' setup.cfg
-  echo -e '[pytest]\nnorecursedirs = .* _* build' > pytest.ini
-
-  # Remove failing tests (we can't test udev inside makepkg)
-  rm tests/test_{util,discover,device,monitor,enumerate,observer}.py
-
-  # Fix documentation build
-  sed -i "s|os.path.join(doc_directory, os.pardir)|os.path.join(doc_directory, os.pardir, 'src')|
-          s|b'autodoc-process-docstring'|'autodoc-process-docstring'|" doc/conf.py
-}
-
-build() {
-  cd $_pkgname-$pkgver
-
-  python setup.py build
-
-  # Generate documentation
-  sphinx-apidoc -f -e -o doc src/pyudev
-  sphinx-build -a -b html doc doc/html
-}
-
-check() {
-  cd $_pkgname-$pkgver
-
-  python setup.py pytest
-}
-
-package() {
-  cd $_pkgname-$pkgver
-
-  python setup.py install --root "$pkgdir" --skip-build -O1
-
-  # Install documentation
-  install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
-  cp -r -a --no-preserve=ownership doc/html "$pkgdir"/usr/share/doc/$pkgname
-  rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
-}

Copied: python-pyudev/repos/community-staging-any/PKGBUILD (from rev 751510, python-pyudev/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-11-12 10:15:51 UTC (rev 751512)
@@ -0,0 +1,64 @@
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: examon <examon.mail[at]gmail[dot]com>
+# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
+# Contributor: Dwight Schauer <dschauer at ti.com>
+
+_pkgname=pyudev
+pkgname=python-$_pkgname
+pkgver=0.22
+pkgrel=5
+arch=('any')
+url='https://github.com/pyudev/pyudev'
+license=('LGPL')
+pkgdesc='Python bindings to libudev'
+depends=('python-six' 'systemd')
+makedepends=('python-setuptools' 'python-sphinx' 'python-mock')
+checkdepends=('python-pytest-runner' 'python-docutils' 'python-mock' 'python-hypothesis')
+optdepends=('python-pyqt5: PyQt integration'
+            'pyside2: PySide integration'
+            'python-wxpython: WX integration')
+source=("$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('b509f4442e1c11eea9755fbae867b0aee97221db60d78ed2b8da40c39fb11015982b2e9b423680ed44b3f9db2c84b3a0a57a1e8aad4fb939061e33646638d9e3')
+
+prepare() {
+  cd $_pkgname-$pkgver
+
+  # pytest-runner doesn't understand norecursedirs
+  sed -i '/norecursedirs/d' setup.cfg
+  echo -e '[pytest]\nnorecursedirs = .* _* build' > pytest.ini
+
+  # Remove failing tests (we can't test udev inside makepkg)
+  rm tests/test_{util,discover,device,monitor,enumerate,observer}.py
+
+  # Fix documentation build
+  sed -i "s|os.path.join(doc_directory, os.pardir)|os.path.join(doc_directory, os.pardir, 'src')|
+          s|b'autodoc-process-docstring'|'autodoc-process-docstring'|" doc/conf.py
+}
+
+build() {
+  cd $_pkgname-$pkgver
+
+  python setup.py build
+
+  # Generate documentation
+  sphinx-apidoc -f -e -o doc src/pyudev
+  sphinx-build -a -b html doc doc/html
+}
+
+check() {
+  cd $_pkgname-$pkgver
+
+  python setup.py pytest
+}
+
+package() {
+  cd $_pkgname-$pkgver
+
+  python setup.py install --root "$pkgdir" --skip-build -O1
+
+  # Install documentation
+  install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
+  cp -r -a --no-preserve=ownership doc/html "$pkgdir"/usr/share/doc/$pkgname
+  rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
+}



More information about the arch-commits mailing list