[packages/python-pyudev] - updated to 0.22.0 - updated mock patch - dropped offline patch and external object indexes - subpa

qboosh qboosh at pld-linux.org
Sun Feb 9 13:20:56 CET 2020


commit 2c79bda1e67bc6cbd3d15e58ef697702bcc08c5d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 9 13:21:03 2020 +0100

    - updated to 0.22.0
    - updated mock patch
    - dropped offline patch and external object indexes
    - subpackage -apidocs

 python-pyudev-mock.patch    | 18 +++++++--------
 python-pyudev-offline.patch | 13 -----------
 python-pyudev.spec          | 54 +++++++++++++++++++++++++++------------------
 3 files changed, 41 insertions(+), 44 deletions(-)
---
diff --git a/python-pyudev.spec b/python-pyudev.spec
index 05aaad5..00bd13a 100644
--- a/python-pyudev.spec
+++ b/python-pyudev.spec
@@ -9,24 +9,14 @@
 Summary:	Pure Python binding for libudev
 Summary(pl.UTF-8):	Czysto pythonowe wiązanie do libudev
 Name:		python-%{module}
-Version:	0.21.0
-Release:	3
+Version:	0.22.0
+Release:	1
 License:	LGPL v2.1+
 Group:		Development/Languages/Python
-#Source0Download: https://pypi.python.org/simple/pyudev/
+#Source0Download: https://pypi.org/simple/pyudev/
 Source0:	https://files.pythonhosted.org/packages/source/p/pyudev/%{module}-%{version}.tar.gz
-# Source0-md5:	cf4d9db7d772622144ca1be6b5d9353b
-#Source1:	http://docs.python.org/2/objects.inv#/python-objects.inv
-Source1:	python-objects.inv
-# Source1-md5:	ad9c579afde0743e007b472cff7f1364
-#Source2:	http://pytest.org/latest/objects.inv#/pytest-objects.inv
-Source2:	pytest-objects.inv
-# Source2-md5:	0704c1b84755f3dd4d0cb782826791c6
-#Source3:	https://deptinfo-ensip.univ-poitiers.fr/ENS/pyside-docs/objects.inv#/pyside-objects.inv
-Source3:	pyside-objects.inv
-# Source3-md5:	8cc5c1ff0bb5ef9f4e9968c9b4a01984
-Patch0:		%{name}-offline.patch
-Patch1:		%{name}-mock.patch
+# Source0-md5:	377eda61186c91e9440f01d76dbb4206
+Patch0:		%{name}-mock.patch
 URL:		http://pyudev.readthedocs.org/
 %if %{with python2}
 BuildRequires:	python-devel >= 1:2.6
@@ -101,24 +91,38 @@ urządzenia, odpytywać o właściwości i atrybuty urządzeń oraz
 monitorować urządzenia, włącznie z asynchronicznym monitorowaniem z
 użyciem wątków albo wewnątrz pętli zdarzeń Qt, GLiba czy wxPythona.
 
+%package apidocs
+Summary:	API documentation for Python pyudev module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona pyudev
+Group:		Documentation
+
+%description apidocs
+API documentation for Python pyudev module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pyudev.
+
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
-%patch1 -p1
-
-cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} doc
 
 %build
 %if %{with python2}
 %py_build
 
-%{?with_tests:PYTHONPATH=$(pwd):$(pwd)/build-2/lib %{__python} -m pytest tests}
+%if %{with tests}
+PYTHONPATH=$(pwd):$(pwd)/build-2/lib \
+%{__python} -m pytest tests
+%endif
 %endif
 
 %if %{with python3}
 %py3_build
 
-%{?with_tests:PYTHONPATH=$(pwd):$(pwd)/build-3/lib %{__python3} -m pytest tests}
+%if %{with tests}
+PYTHONPATH=$(pwd):$(pwd)/build-3/lib \
+%{__python3} -m pytest tests
+%endif
 %endif
 
 %if %{with doc}
@@ -145,7 +149,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.rst README.rst %{?with_doc:doc/html}
+%doc CHANGES.rst README.rst
 %{py_sitescriptdir}/pyudev
 %{py_sitescriptdir}/pyudev-%{version}-py*.egg-info
 %endif
@@ -153,7 +157,13 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc CHANGES.rst README.rst %{?with_doc:doc/html}
+%doc CHANGES.rst README.rst
 %{py3_sitescriptdir}/pyudev
 %{py3_sitescriptdir}/pyudev-%{version}-py*.egg-info
 %endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/{_static,api,tests,*.html,*.js}
+%endif
diff --git a/python-pyudev-mock.patch b/python-pyudev-mock.patch
index facbf07..f929175 100644
--- a/python-pyudev-mock.patch
+++ b/python-pyudev-mock.patch
@@ -26,20 +26,20 @@
  
  from pyudev import Devices
  
---- pyudev-0.21.0/tests/plugins/mock_libudev.py.orig	2016-02-02 17:19:29.000000000 +0100
-+++ pyudev-0.21.0/tests/plugins/mock_libudev.py	2017-04-16 12:43:19.139192536 +0200
-@@ -34,7 +34,10 @@ from operator import attrgetter
- from contextlib import contextmanager
+--- pyudev-0.22.0/tests/plugins/mock_libudev.py.orig	2020-02-09 12:46:31.756005870 +0100
++++ pyudev-0.22.0/tests/plugins/mock_libudev.py	2020-02-09 12:48:09.762141592 +0100
+@@ -33,7 +33,10 @@
  from collections import namedtuple
  
+ import pytest
 -import mock
 +try:
 +    from unittest import mock
 +except ImportError:
 +    import mock
  
- 
  Node = namedtuple('Node', 'name value next')
+ 
 --- pyudev-0.21.0/tests/test_core.py.orig	2016-04-29 23:17:02.000000000 +0200
 +++ pyudev-0.21.0/tests/test_core.py	2017-04-16 12:41:32.362527088 +0200
 @@ -22,7 +22,10 @@ from __future__ import (print_function,
@@ -54,12 +54,12 @@
  
  from pyudev import udev_version
  
---- pyudev-0.21.0/tests/test_enumerate.py.orig	2016-07-21 22:32:53.000000000 +0200
-+++ pyudev-0.21.0/tests/test_enumerate.py	2017-04-16 12:42:44.235859601 +0200
-@@ -20,7 +20,10 @@ from __future__ import (print_function,
+--- pyudev-0.22.0/tests/test_enumerate.py.orig	2020-02-09 12:46:31.759339185 +0100
++++ pyudev-0.22.0/tests/test_enumerate.py	2020-02-09 12:47:35.475660671 +0100
+@@ -18,7 +18,10 @@
+ from __future__ import (print_function, division, unicode_literals,
                          absolute_import)
  
- import pytest
 -import mock
 +try:
 +    from unittest import mock
diff --git a/python-pyudev-offline.patch b/python-pyudev-offline.patch
deleted file mode 100644
index ac60f8c..0000000
--- a/python-pyudev-offline.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- pyudev-0.17/doc/conf.py~	2015-08-26 19:25:15.000000000 +0200
-+++ pyudev-0.17/doc/conf.py	2015-09-15 18:16:33.788434427 +0200
-@@ -103,8 +103,8 @@
- html_sidebars = {'**': ['info.html', 'localtoc.html', 'relations.html',
-                         'sourcelink.html']}
- 
--intersphinx_mapping = {'python': ('http://docs.python.org/', None),
--                       'pytest': ('http://pytest.org/latest', None)}
-+intersphinx_mapping = {'python': ('http://docs.python.org/', 'python-objects.inv'),
-+                       'pytest': ('http://pytest.org/latest', 'python-objects.inv')}
- 
- 
- class UDevVersion(Directive):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyudev.git/commitdiff/2c79bda1e67bc6cbd3d15e58ef697702bcc08c5d



More information about the pld-cvs-commit mailing list