Date: Saturday, September 3, 2022 @ 19:27:29
  Author: ffy00
Revision: 1292720

archrelease: copy trunk to community-any

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

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

Deleted: 0001-tests-fix-tests-for-pytest-4.0.patch
===================================================================
--- 0001-tests-fix-tests-for-pytest-4.0.patch   2022-09-03 19:27:25 UTC (rev 
1292719)
+++ 0001-tests-fix-tests-for-pytest-4.0.patch   2022-09-03 19:27:29 UTC (rev 
1292720)
@@ -1,64 +0,0 @@
-From cc04bc5ca08e4761b41c5cf220889c4233f157a0 Mon Sep 17 00:00:00 2001
-From: FFY00 <filipe.la...@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-any/0001-tests-fix-tests-for-pytest-4.0.patch 
(from rev 1292719, 
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   2022-09-03 19:27:29 UTC (rev 
1292720)
@@ -0,0 +1,64 @@
+From cc04bc5ca08e4761b41c5cf220889c4233f157a0 Mon Sep 17 00:00:00 2001
+From: FFY00 <filipe.la...@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    2022-09-03 19:27:25 UTC (rev 1292719)
+++ PKGBUILD    2022-09-03 19:27:29 UTC (rev 1292720)
@@ -1,64 +0,0 @@
-# Maintainer: Filipe Laíns (FFY00) <la...@archlinux.org>
-# Contributor: Andrea Scarpino <and...@archlinux.org>
-# Contributor: examon <examon.mail[at]gmail[dot]com>
-# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
-# Contributor: Dwight Schauer <dscha...@ti.com>
-
-_pkgname=pyudev
-pkgname=python-$_pkgname
-pkgver=0.22
-pkgrel=7
-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-any/PKGBUILD (from rev 1292719, 
python-pyudev/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2022-09-03 19:27:29 UTC (rev 1292720)
@@ -0,0 +1,60 @@
+# Maintainer: Filipe Laíns (FFY00) <la...@archlinux.org>
+# Contributor: Andrea Scarpino <and...@archlinux.org>
+# Contributor: examon <examon.mail[at]gmail[dot]com>
+# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
+# Contributor: Dwight Schauer <dscha...@ti.com>
+
+_pkgname=pyudev
+pkgname=python-$_pkgname
+pkgver=0.24.0
+pkgrel=1
+arch=('any')
+url='https://github.com/pyudev/pyudev'
+license=('LGPL')
+pkgdesc='Python bindings to libudev'
+depends=('python-six' 'systemd')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 
'python-wheel' 'python-sphinx' 'python-mock')
+checkdepends=('python-pytest' 'python-docutils' 'python-mock' 
'python-hypothesis' 'python-pip')
+optdepends=('python-pyqt5: PyQt integration'
+            'pyside2: PySide integration'
+            'python-wxpython: WX integration')
+source=("$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('fe6fec9bbc402bbcf6458b6c3ea2db43ac3ac03bba3c74193dde46253b532d1c9d55ad78e4bc8fa0ff660bf0e371f07ef60c6c4a6251b0dd64acbb129f63507e')
+
+prepare() {
+  cd $_pkgname-$pkgver
+
+  # 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 -m build -nw
+
+  # Generate documentation
+  sphinx-apidoc -f -e -o doc src/pyudev
+  sphinx-build -a -b html doc doc/html
+}
+
+check() {
+  cd $_pkgname-$pkgver
+
+  PYTHONPATH=src python -m pytest
+}
+
+package() {
+  cd $_pkgname-$pkgver
+
+  python -m installer -d "$pkgdir" dist/*.whl
+
+  # 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
+}

Reply via email to