From ec4dadc9dc62b8e9ed6278a25c297fd8d5377d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 14 Nov 2023 13:52:35 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-pyudev revision b8ebcb0ccf854195e0c0ce2ad83fbcd0 --- .gitattributes | 23 +++ hypothesis_settings.patch | 89 +++++++++ pytest_register_mark.patch | 85 +++++++++ python-pyudev-0.24.1-gh.tar.gz | 3 + python-pyudev.changes | 335 +++++++++++++++++++++++++++++++++ python-pyudev.spec | 85 +++++++++ 6 files changed, 620 insertions(+) create mode 100644 .gitattributes create mode 100644 hypothesis_settings.patch create mode 100644 pytest_register_mark.patch create mode 100644 python-pyudev-0.24.1-gh.tar.gz create mode 100644 python-pyudev.changes create mode 100644 python-pyudev.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/hypothesis_settings.patch b/hypothesis_settings.patch new file mode 100644 index 0000000..5501e2c --- /dev/null +++ b/hypothesis_settings.patch @@ -0,0 +1,89 @@ +Index: pyudev-0.24.1/tests/test_enumerate.py +=================================================================== +--- pyudev-0.24.1.orig/tests/test_enumerate.py ++++ pyudev-0.24.1/tests/test_enumerate.py +@@ -88,7 +88,7 @@ class TestEnumerator(object): + + @failed_health_check_wrapper + @given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY) +- @settings(max_examples=10) ++ @settings(max_examples=10, deadline=None) + def test_match_subsystem(self, context, subsystem): + """ + Subsystem match matches devices w/ correct subsystem. +@@ -113,7 +113,7 @@ class TestEnumerator(object): + + @failed_health_check_wrapper + @given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY) +- @settings(max_examples=1) ++ @settings(max_examples=1, deadline=2000) + def test_match_subsystem_nomatch_complete(self, context, subsystem): + """ + Test that w/ respect to the universe of devices returned by +@@ -131,7 +131,7 @@ class TestEnumerator(object): + + @failed_health_check_wrapper + @given(_CONTEXT_STRATEGY, _MATCH_PROPERTY_STRATEGY.filter(lambda x: _is_bool(x[1]))) +- @settings(max_examples=10) ++ @settings(max_examples=10, deadline=2000) + def test_match_property_bool(self, context, pair): + """ + Verify that a probably boolean property lookup works. +@@ -149,7 +149,7 @@ class TestEnumerator(object): + @given( + _CONTEXT_STRATEGY, device_strategy(filter_func=lambda d: d.parent is not None) + ) +- @settings(max_examples=5) ++ @settings(max_examples=5, deadline=2000) + def test_match_parent(self, context, device): + """ + For a given device, verify that it is in its parent's children. +@@ -175,7 +175,7 @@ class TestEnumeratorMatchCombinations(ob + _SYSNAME_STRATEGY, + _MATCH_PROPERTY_STRATEGY, + ) +- @settings(max_examples=10) ++ @settings(max_examples=10, deadline=2000) + def test_match(self, context, subsystem, sysname, ppair): + """ + Test that matches from different categories are a conjunction. +@@ -231,7 +231,7 @@ class TestEnumeratorMatchMethod(object): + match_sys_name.assert_called_with(mock.sentinel.sys_name) + + @given(_ENUMERATOR_STRATEGY) +- @settings(max_examples=1) ++ @settings(max_examples=1, deadline=2000) + def test_match_passthrough_tag(self, enumerator): + """ + Test that special keyword tag results in a match_tag call. +@@ -242,7 +242,7 @@ class TestEnumeratorMatchMethod(object): + + @_UDEV_TEST(172, "test_match_passthrough_parent") + @given(_ENUMERATOR_STRATEGY) +- @settings(max_examples=1) ++ @settings(max_examples=1, deadline=2000) + def test_match_passthrough_parent(self, enumerator): + """ + Test that special keyword 'parent' results in a match parent call. +@@ -254,7 +254,7 @@ class TestEnumeratorMatchMethod(object): + match_parent.assert_called_with(mock.sentinel.parent) + + @given(_ENUMERATOR_STRATEGY) +- @settings(max_examples=1) ++ @settings(max_examples=1, deadline=2000) + def test_match_passthrough_property(self, enumerator): + """ + Test that non-special keyword args are treated as properties. +Index: pyudev-0.24.1/tests/_device_tests/_device_tests.py +=================================================================== +--- pyudev-0.24.1.orig/tests/_device_tests/_device_tests.py ++++ pyudev-0.24.1/tests/_device_tests/_device_tests.py +@@ -61,7 +61,7 @@ class TestDevice(object): + @pytest.mark.skipif(len(_devices) == 0, reason="no device with a parent") + @_UDEV_TEST(172, "test_child_of_parents") + @given(strategies.sampled_from(_devices)) +- @settings(max_examples=5) ++ @settings(max_examples=5, deadline=2000) + def test_child_of_parent(self, a_device): + assert a_device in a_device.parent.children + diff --git a/pytest_register_mark.patch b/pytest_register_mark.patch new file mode 100644 index 0000000..893cdfb --- /dev/null +++ b/pytest_register_mark.patch @@ -0,0 +1,85 @@ +Index: pyudev-0.24.1/pytest.ini +=================================================================== +--- pyudev-0.24.1.orig/pytest.ini ++++ pyudev-0.24.1/pytest.ini +@@ -1,3 +1,6 @@ +-[tool:pytest] ++[pytest] + # do not search for tests in build directory + norecursedirs = .* _* build ++markers = ++ conversion ++ real_udev +Index: pyudev-0.24.1/tests/_device_tests/_device_tests.py +=================================================================== +--- pyudev-0.24.1.orig/tests/_device_tests/_device_tests.py ++++ pyudev-0.24.1/tests/_device_tests/_device_tests.py +@@ -212,6 +212,7 @@ class TestDevice(object): + if device.device_node: + assert is_unicode_string(device.device_node) + ++ @pytest.mark.real_udev + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA)) + @settings(max_examples=5) + def test_device_number(self, a_context, device_datum): +Index: pyudev-0.24.1/tests/_device_tests/_devices_tests.py +=================================================================== +--- pyudev-0.24.1.orig/tests/_device_tests/_devices_tests.py ++++ pyudev-0.24.1/tests/_device_tests/_devices_tests.py +@@ -125,6 +125,7 @@ class TestDevices(object): + assert error.subsystem == "no_such_subsystem" + assert error.sys_name == "foobar" + ++ @pytest.mark.real_udev + @failed_health_check_wrapper + @given( + _CONTEXT_STRATEGY, +@@ -140,6 +141,7 @@ class TestDevices(object): + device = Devices.from_device_number(a_context, typ, a_device.device_number) + assert a_device == device + ++ @pytest.mark.real_udev + @failed_health_check_wrapper + @given( + _CONTEXT_STRATEGY, +@@ -175,6 +177,7 @@ class TestDevices(object): + with pytest.raises(DeviceNotFoundByNumberError): + Devices.from_device_number(_CONTEXT, "foobar", 100) + ++ @pytest.mark.real_udev + @failed_health_check_wrapper + @given( + _CONTEXT_STRATEGY, +Index: pyudev-0.24.1/tests/test_enumerate.py +=================================================================== +--- pyudev-0.24.1.orig/tests/test_enumerate.py ++++ pyudev-0.24.1/tests/test_enumerate.py +@@ -101,7 +101,7 @@ class TestEnumerator(object): + + @failed_health_check_wrapper + @given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY) +- @settings(max_examples=5) ++ @settings(max_examples=5, deadline=None) + def test_match_subsystem_nomatch_unfulfillable(self, context, subsystem): + """ + Combining match and no match should give an empty result. +Index: pyudev-0.24.1/tests/test_util.py +=================================================================== +--- pyudev-0.24.1.orig/tests/test_util.py ++++ pyudev-0.24.1/tests/test_util.py +@@ -119,6 +119,7 @@ def raise_valueerror(): + _CHAR_DEVICES = list(_CONTEXT.list_devices(subsystem="tty")) + + ++@pytest.mark.real_udev + @pytest.mark.skipif(len(_CHAR_DEVICES) == 0, reason="no tty devices") + @given(strategies.sampled_from(_CHAR_DEVICES)) + @settings(max_examples=5) +@@ -132,6 +133,7 @@ def test_get_device_type_character_devic + _BLOCK_DEVICES = list(_CONTEXT.list_devices(subsystem="block")) + + ++@pytest.mark.real_udev + @pytest.mark.skipif(len(_BLOCK_DEVICES) == 0, reason="no block devices") + @given(strategies.sampled_from(_BLOCK_DEVICES)) + @settings(max_examples=5) diff --git a/python-pyudev-0.24.1-gh.tar.gz b/python-pyudev-0.24.1-gh.tar.gz new file mode 100644 index 0000000..97280a5 --- /dev/null +++ b/python-pyudev-0.24.1-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b277149ebca914d3f5daff1a7fa1e0d00bea9c4950af8ac95d9a8a83f2937c79 +size 81689 diff --git a/python-pyudev.changes b/python-pyudev.changes new file mode 100644 index 0000000..f15dcca --- /dev/null +++ b/python-pyudev.changes @@ -0,0 +1,335 @@ +------------------------------------------------------------------- +Mon Oct 30 16:58:20 UTC 2023 - Daniel Garcia + +- update hypothesis_settings.patch: + * Extend deadline for test_child_of_parents that fails on ppc64le (bsc#1216607) + +------------------------------------------------------------------- +Wed May 3 09:11:27 UTC 2023 - Dirk Müller + +- update to 0.24.1: + * Recommended development release: Fedora 37 + * Add support for PySide6 + * Add missing 'priority' argument for GLib.to_add_watch() + * Tidies and Maintenance fixes + +------------------------------------------------------------------- +Fri Apr 21 12:32:30 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Fri Oct 14 08:25:20 UTC 2022 - Dirk Müller + +- update hypothesis_settings.patch: + * extend deadlines to handle qemu emulated arches better + +------------------------------------------------------------------- +Sat Oct 1 07:48:17 UTC 2022 - Dirk Müller + +- update to 0.24.0: + * Remove six dependency + * Drop pylint tasks + * Support python 3.9 and 3.10 + +------------------------------------------------------------------- +Thu Mar 17 09:06:05 UTC 2022 - Steve Kowalik + +- Skip some unreliable tests. + +------------------------------------------------------------------- +Thu Mar 10 14:04:43 UTC 2022 - mcepl@cepl.eu + +- Update to version 0.23.2+14: + * Remove a bunch of python-2 only testing + * Bump some Python versions + * Get rid of six dependency + * Drop all pylint tasks + * Remove overly rigorous tests + * Make a package target that uses build + * Omit PyPy flakey test + * Check whether the Context has a "_libudev" attribute + * Remove setup.cfg + * Remove obsolete egg_info parameter + * Delete another flaky test +- Rebase hypothesis_settings.patch and pytest_register_mark.patch. +- Drop six (Build)?Requires. + +------------------------------------------------------------------- +Tue Jan 25 08:54:16 UTC 2022 - Bernhard Wiedemann + +- Don't add date to version for reproducible builds (boo#1047218) + +------------------------------------------------------------------- +Sun Jan 16 22:53:34 UTC 2022 - mcepl@cepl.eu + +- Update to version 0.22.0+git.1642212208.d5630bf (bsc#1194613): + * Remove another flakey test + * Remove all traces of tox + * Update next Fedora to 35 + * Delete a test which is probably flakey for real + * Bump recommended development environment to fedora 34 + * Use yamllint on all the configuration files + * Add annotations to GitHub workflows + * No longer use --recursive for isort + * Update formatting for new black + * Establish a weekly task for future fedora +- Remove upstreamed patches: + - remove_mock.patch + +------------------------------------------------------------------- +Tue Aug 10 12:49:04 UTC 2021 - Matej Cepl + +- Add hypothesis_settings.patch to allow longer timeouts in OBS. + +------------------------------------------------------------------- +Sat Dec 12 13:12:21 UTC 2020 - Benjamin Greiner + +- Add remove_mock.patch gh#pyudev/pyudev#409 +- Static linting with pylint is not needed for unit tests or build + +------------------------------------------------------------------- +Thu Oct 8 23:03:04 UTC 2020 - Matej Cepl + +- Add pytest_register_mark.patch to make the test suite at least + syntactically correct and skip over tests we cannot run because + of missing /dev gh#pyudev/pyudev#404. + +------------------------------------------------------------------- +Fri Feb 28 21:38:51 UTC 2020 - Dirk Mueller + +- update to 0.22.0: + - Add a six-enabled move for collections move imports: + https://github.com/pyudev/pyudev/pull/386 + - Fix any newly introduced pylint errors + - Numerous improvements or updates to the test infrastructure + - A number of test updates + - Require yapf 0.21.0 for Python formatting + - Various documentation fixes and updates + +------------------------------------------------------------------- +Tue Dec 4 12:53:19 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Tue Jan 30 08:07:41 UTC 2018 - mimi.vx@gmail.com + +- fix Requires and BuiildRequires + +------------------------------------------------------------------- +Tue Jan 23 17:35:31 UTC 2018 - tbechtold@suse.com + +- Require libudev (bsc#1077282) + Otherwise, an pyudev import fails with: + ImportError: No library named udev + +------------------------------------------------------------------- +Thu Aug 24 13:52:57 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + +------------------------------------------------------------------- +Mon May 23 16:12:57 UTC 2016 - tbechtold@suse.com + +- Remove do_not_install_tests.patch +- Require python-six + +------------------------------------------------------------------- +Mon May 23 14:49:16 UTC 2016 - tbechtold@suse.com + +- update to 0.20.0: + * Remove parsing code added in previous release. + * No longer do CI for Python 2.6. + * Eliminate all wildcard imports and __all__ statements. + * No longer use deprecated Device.from_sys_path() method. + * Minor pylint induced changes. + * Documentation fixes. + * Restore raising KeyError by Attributes.as* methods when attribute not found. + * Explicitly require six module. + * Never raise a DeviceNotFoundError when iterating over a device enumeration. + * Device.subsystem() now returns None if device has no subsystem. + * Add DeprecationWarnings to deprecated Device methods. + * Replace "/" with "!" in Device.from_name() sys_name parameter. + * Add some unstable classes for parsing some kinds of values. + * Make version info more like Python's including micro numbers and levels. + * Refactor some internal modules into subdirectories. + * Work on tests and reproducers. + * DeviceNotFoundError is no longer a subtype of LookupError + * Added support for pyqt5 monitor observer + * Added discover module, which looks up a device on limited information + * Attributes class no longer extends Mapping, extends object instead + * Attributes class no longer inherits [] operator, Mapping methods + * Attributes class objects are no longer iterable + * Attributes.available_attributes property added + * Attributes.get() method, with usual semantics, defined + * Device.from_* methods are deprecated, uses Devices.from_* methods instead + * Device.from_device_file() now raises DeviceNotFoundByFileError + * Device.from_device_number() now raises DeviceNotFoundByNumberError + * Devices.from_interface_index() method added + * Devices.from_kernel_device() method added + * Numerous testing infrastructure changes +- Remove do_not_install_tests.patch . No longer needed. +- Require libudev1 . Needed to use python-pyudev + +------------------------------------------------------------------- +Wed Sep 23 18:44:41 UTC 2015 - asterios.dramis@gmail.com + +- Added a patch (do_not_install_tests.patch) to not install the + tests as a module (not needed). Fixes also file conflicts in + Factory. + +------------------------------------------------------------------- +Tue Sep 15 05:47:44 UTC 2015 - hpj@urpla.net + +- Update to version 0.17: + * #52: Remove global libudev object + * #57: Really start the monitor on :meth:`pyudev.Monitor.poll()` + * #60: Do not use :meth:`select.select` to avoid hitting its file descriptor + limit + * #58: Force non-blocking IO in :class:`pyudev.Monitor` to avoid blocking on + receiving the device + * #63: Set proper flags on pipe fds. + * #65: Handle irregular polling events properly. + * #50: Add :class:`pyudev.wx.MonitorObserver` and deprecate + :class:`pyudev.wx.WxUDevMonitorObserver` + * #50: Add :class:`pyudev.glib.MonitorObserver` and deprecate + :class:`pyudev.glib.GUDevMonitorObserver` + * #50: Add :class:`pyudev.pyqt4.MonitorObserver` and deprecate + :class:`pyudev.pyqt4.QUDevMonitorObserver` + * #50: Add :class:`pyudev.pyside.MonitorObserver` and deprecate + :class:`pyudev.pyside.QUDevMonitorObserver` + * Add a wrapper function to retry interruptible system calls. + +------------------------------------------------------------------- +Thu Oct 24 11:12:59 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Tue Nov 20 11:14:36 UTC 2012 - saschpe@suse.de + +- Build HTML documentation +- Fix SLE_11_SP2 build (not noarch) + +------------------------------------------------------------------- +Sun Nov 18 19:40:16 UTC 2012 - asterios.dramis@gmail.com + +- Update to version 0.16.1: + * #53: Fix source distribution + * #54: Fix typo in test + From version 0.16: + * Remove :meth:`pyudev.Monitor.from_socket`. + * Deprecate :meth:`pyudev.Device.traverse()` in favor of + :attr:`pyudev.Device.ancestors`. + * #47: Deprecate :meth:`pyudev.Monitor.receive_device` in favor of + :attr:`pyudev.Monitor.poll`. + * #47: Deprecate :attr:`pyudev.Monitor.enable_receiving` in favor of + :attr:`pyudev.Monitor.start`. + * #47: Deprecate :attr:`pyudev.Monitor.__iter__` in favor of explicit looping + or :class:`pyudev.MonitorObserver`. + * #49: Deprecate ``event_handler`` to :class:`pyudev.MonitorObserver` in + favour of ``callback`` argument. + * #46: Continuously test pyudev on Travis-CI. + * Add :attr:`pyudev.Device.ancestors`. + * Add :attr:`pyudev.Device.action`. + * #10: Add :attr:`pyudev.Device.sequence_number`. + * #47: Add :meth:`pyudev.Monitor.poll`. + * #47: Add :attr:`pyudev.Monitor.started`. + * #49: Add ``callback`` argument to :class:`pyudev.Monitor`. + * :meth:`pyudev.Monitor.start` can be called repeatedly. + * #45: Get rid of 2to3 + * #43: Fix test failures on Python 2.6 + * Fix signature in declaration of ``udev_monitor_set_receive_buffer_size``. + * #44: Test wrapped signatures with help of ``gccxml``. + * Fix compatibility with udev 183 and newer in :class:`pyudev.Context`. + * :meth:`pyudev.MonitorObserver.stop` can be called from the observer thread. +- Removed python-setuptools and added python-distribute as build requirement. + +------------------------------------------------------------------- +Sat Mar 10 19:20:03 UTC 2012 - asterios.dramis@gmail.com + +- Update to version 0.15: + * #20: :meth:`pyudev.Monitor.filter_by()` and + :meth:`pyudev.Monitor.filter_by_tag()` can be called after + :meth:`pyudev.Monitor.enable_receiving()` now + * #20: Added :meth:`~pyudev.Monitor.remove_filter()` + * :class:`pyudev.MonitorObserver` calls + :meth:`pyudev.Monitor.enable_receiving()` now when started. + * #40: Added user guide to the documentation + * #39: Added :meth:`pyudev.Device.from_device_file()` + * :data:`errno.EINVAL` from underlying libudev functions causes + :exc:`~exceptions.ValueError` instead of + :exc:`~exceptions.EnvironmentError` now. + +------------------------------------------------------------------- +Sat Feb 18 16:21:43 UTC 2012 - asterios.dramis@gmail.com + +- Update to version 0.14: + * Documentation now hosted at http://pyudev.readthedocs.org + * #37: Added :class:`pyudev.wx.WxUDevMonitorObserver` for wxPython + * Added :class:`pyudev.MonitorObserver` + * Added :attr:`pyudev.glib.GUDevMonitorObserver.enabled`, + :attr:`pyudev.pyqt4.QUDevMonitorObserver.enabled` and + :attr:`pyudev.pyside.QUDevMonitorObserver.enabled` + +------------------------------------------------------------------- +Sun Nov 6 13:37:02 UTC 2011 - asterios.dramis@gmail.com + +- Update to version 0.13: + * #36: Added :meth:`pyudev.Monitor.set_receive_buffer_size` (thanks to Rémi + Rérolle) + * #34: :class:`pyudev.Device.tags` returns a :class:`pyudev.Tags` object now + * Added :meth:`pyudev.Enumerator.match_parent` + * Added ``parent`` keyword argument to :meth:`pyudev.Enumerator.match()` + * Removed :meth:`pyudev.Enumerator.match_children` in favour of + :meth:`pyudev.Enumerator.match_parent` + * :attr:`pyudev.Device.children` requires udev version 172 now + * #31: Added :meth:`pyudev.Enumerator.match_attribute` + * Added ``nomatch`` argument to :meth:`pyudev.Enumerator.match_subsystem` and + :meth:`pyudev.Enumerator.match_attribute` + +------------------------------------------------------------------- +Wed Aug 31 20:43:18 UTC 2011 - asterios.dramis@gmail.com + +- Update to version 0.12: + * #32: Fixed memory leak + * #33: Fixed Python 3 support for :mod:`pyudev.glib` + * Fixed license header in :mod:`pyudev._compat` +- Spec file updates. + * Changed License: to LGPL-2.1+. + * Minor other updates. + +------------------------------------------------------------------- +Sun Aug 28 19:28:06 UTC 2011 - asterios.dramis@gmail.com + +- Update to version 0.11: + * #30: Added :attr:`pyudev.Device.sys_number` + * #29: Added :meth:`pyudev.Device.from_device_number` and + :attr:`pyudev.Device.device_number` + * Officially support PyPy now + From 0.10: + * Added :attr:`pyudev.__version_info__` + * Added :attr:`pyudev.Device.device_type` + * :class:`pyudev.Context`, :class:`pyudev.Enumerator`, :class:`pyudev.Device` + and :class:`pyudev.Monitor` can now directly be passed to + :mod:`ctypes`-wrapped functions + * #24: Added :attr:`pyudev.Context.run_path` + From 0.9: + * #21: Added :meth:`pyudev.Device.find_parent` + * #22: Added :meth:`pyudev.Monitor.filter_by_tag` + * Added :attr:`pyudev.Context.log_priority` to control internal UDev logging + * Improve error reporting, if libudev is missing +- Spec file updates: + * Changed package name to python-pyudev. + * Changed License: to LGPL-2.1. + * Updated Url:. + * Added Provides/Obsoletes entries for pyudev. + * Build the package as noarch. + * Minor other updates. + +------------------------------------------------------------------- +Tue Feb 8 13:18:25 UTC 2011 - tittiatcoke@gmail.com + +- Initial Package (version 0.8). + diff --git a/python-pyudev.spec b/python-pyudev.spec new file mode 100644 index 0000000..c31ab53 --- /dev/null +++ b/python-pyudev.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-pyudev +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} +Name: python-pyudev +Version: 0.24.1 +Release: 0 +Summary: Udev bindings for Python +License: LGPL-2.1-or-later +Group: Development/Libraries/Python +URL: https://pyudev.readthedocs.io/ +Source0: https://github.com/pyudev/pyudev/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}-gh.tar.gz +# PATCH-FIX-UPSTREAM pytest_register_mark.patch gh#pyudev/pyudev#404 mcepl@suse.com +# Add missing mark registration and register and use another mark +Patch0: pytest_register_mark.patch +# PATCH-FIX-OPENSUSE hypothesis_settings.patch mcepl@suse.com +# tests timeout on OBS +Patch2: hypothesis_settings.patch +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(udev) +Requires: libudev1 +BuildArch: noarch +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module yapf} +%if 0%{?suse_version} < 1550 +BuildRequires: python-mock +%endif +%ifpython2 +# pyudev was last used in KDE:Unstable:Playground (pyudev-0.8) +Provides: pyudev = %{version} +Obsoletes: pyudev < %{version} +%endif +%python_subpackages + +%description +A Python binding to libudev, the hardware management library and service found +in modern linux systems. + +%prep +%autosetup -p1 -n pyudev-%{version} + +# Disable intersphinx and issuetracker, we don't want to access the web during doc build: +sed -i -e "s|'sphinx.ext.intersphinx',\\?||" -e "s|'sphinxcontrib.issuetracker',\\?||" doc/conf.py + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# We don't have real /dev in osc build chroot gh#pyudev/pyudev#404 +# ... or apparently, a reliable testsuite gh#pyudev/pyudev#457 +%pytest -k 'not (real_udev or test_as or test_getitem)' + +%files %{python_files} +%license COPYING +%doc CHANGES.rst README.rst +%{python_sitelib}/* + +%changelog