Blame SPECS/python-pyudev.spec

2202d6
%global srcname pyudev
2202d6
2202d6
%if 0%{?rhel} == 8
2202d6
%bcond_with python2
2202d6
%bcond_with qt4
2202d6
%else
2202d6
%bcond_without python2
2202d6
%bcond_without qt4
2202d6
%endif
2202d6
2202d6
Name:             python-%{srcname}
2202d6
Version:          0.21.0
2202d6
Release:          7%{?dist}
2202d6
Summary:          A libudev binding
2202d6
2202d6
License:          LGPLv2+
2202d6
URL:              http://pypi.python.org/pypi/pyudev
2202d6
Source0:          https://pypi.io/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
2202d6
2202d6
BuildArch:        noarch
2202d6
2202d6
%description
2202d6
pyudev is a LGPL licensed, pure Python binding for libudev, the device
2202d6
and hardware management and information library for Linux.  It supports
2202d6
almost all libudev functionality, you can enumerate devices, query device
2202d6
properties and attributes or monitor devices, including asynchronous
2202d6
monitoring with threads, or within the event loops of Qt, Glib or wxPython.
2202d6
2202d6
The binding supports CPython 2 (2.6 or newer) and 3 (3.1 or newer), and
2202d6
PyPy 1.5 or newer.  It is tested against udev 151 or newer, earlier
2202d6
versions of udev as found on dated Linux systems may work, but are not
2202d6
officially supported.
2202d6
2202d6
%if %{with python2}
2202d6
%package -n python2-%{srcname}
2202d6
Summary:          A libudev binding
2202d6
%{?python_provide:%python_provide python2-%{srcname}}
2202d6
2202d6
BuildRequires:    python2-devel
2202d6
BuildRequires:    python2-setuptools
2202d6
2202d6
# Dependencies for libraries loaded through ctypes
2202d6
# glibc is needed for pipe2. This is not needed in the python3 package.
2202d6
Requires:         glibc
2202d6
2202d6
# Needed for libudev
2202d6
Requires:         systemd-libs
2202d6
2202d6
# Used for python2/3 compatibility
2202d6
Requires:         python2-six
2202d6
2202d6
%description -n python2-%{srcname}
2202d6
pyudev is a LGPL licensed, pure Python binding for libudev, the device
2202d6
and hardware management and information library for Linux.  It supports
2202d6
almost all libudev functionality, you can enumerate devices, query device
2202d6
properties and attributes or monitor devices, including asynchronous
2202d6
monitoring with threads, or within the event loops of Qt, Glib or wxPython.
2202d6
2202d6
The binding supports CPython 2 (2.6 or newer) and 3 (3.1 or newer), and
2202d6
PyPy 1.5 or newer.  It is tested against udev 151 or newer, earlier
2202d6
versions of udev as found on dated Linux systems may work, but are not
2202d6
officially supported.
2202d6
2202d6
%package -n python2-%{srcname}-glib
2202d6
Summary:          GLib integration for pyudev
2202d6
2202d6
Requires:         pygobject2
2202d6
Requires:         python2-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python2-%{srcname}-glib
2202d6
GLib integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.glib that contains classes for
2202d6
integrating a pyudev monitor with the GLib main loop.
2202d6
2202d6
%if %{with qt4}
2202d6
%package -n python2-%{srcname}-qt4
2202d6
Summary:          Qt4 integration for pyudev
2202d6
2202d6
Requires:         PyQt4
2202d6
Requires:         python2-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python2-%{srcname}-qt4
2202d6
Qt4 integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.pyqt4 that contains classes for
2202d6
integrating a pyudev monitor with the Qt4 main loop.
2202d6
%endif
2202d6
2202d6
%package -n python2-%{srcname}-qt5
2202d6
Summary:          Qt5 integration for pyudev
2202d6
2202d6
Requires:         python-qt5
2202d6
Requires:         python2-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python2-%{srcname}-qt5
2202d6
Qt5 integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.pyqt5 that contains classes for
2202d6
integrating a pyudev monitor with the Qt4 main loop.
2202d6
2202d6
%package -n python2-%{srcname}-pyside
2202d6
Summary:           PySide integration for pyudev
2202d6
2202d6
Requires:          python-pyside
2202d6
Requires:          python2-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python2-%{srcname}-pyside
2202d6
PySide integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.pyside that contains classes for
2202d6
integrating a pyudev monitor with the PySide main loop.
2202d6
2202d6
%package -n python2-%{srcname}-wx
2202d6
Summary:            wxPython integration for pyudev
2202d6
2202d6
Requires:           wxPython
2202d6
Requires:           python2-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python2-%{srcname}-wx
2202d6
wxPython integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.wx that contains classes for
2202d6
integrating a pyudev montior with the wxPython main loop.
2202d6
%endif
2202d6
2202d6
%package -n python3-%{srcname}
2202d6
Summary:          A libudev binding
2202d6
%{?python_provide:%python_provide python3-%{srcname}}
2202d6
2202d6
BuildRequires:    python3-devel
2202d6
BuildRequires:    python3-setuptools
2202d6
2202d6
# Needed for libudev, loaded through ctypes
2202d6
Requires:         systemd-libs
2202d6
2202d6
# Used for python2/3 compatibility
2202d6
Requires:         python3-six
2202d6
2202d6
%description -n python3-%{srcname}
2202d6
pyudev is a LGPL licensed, pure Python binding for libudev, the device
2202d6
and hardware management and information library for Linux.  It supports
2202d6
almost all libudev functionality, you can enumerate devices, query device
2202d6
properties and attributes or monitor devices, including asynchronous
2202d6
monitoring with threads, or within the event loops of Qt, Glib or wxPython.
2202d6
2202d6
The binding supports CPython 2 (2.6 or newer) and 3 (3.1 or newer), and
2202d6
PyPy 1.5 or newer.  It is tested against udev 151 or newer, earlier
2202d6
versions of udev as found on dated Linux systems may work, but are not
2202d6
officially supported.
2202d6
2202d6
%if %{with qt4}
2202d6
%package -n python3-%{srcname}-qt4
2202d6
Summary:          Qt4 integration for pyudev
2202d6
2202d6
Requires:         python3-PyQt4
2202d6
Requires:         python3-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python3-%{srcname}-qt4
2202d6
Qt4 integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.pyqt4 that contains classes for
2202d6
integrating a pyudev monitor with the Qt4 main loop.
2202d6
%endif
2202d6
2202d6
%package -n python3-%{srcname}-qt5
2202d6
Summary:          Qt5 integration for pyudev
2202d6
2202d6
Requires:         python3-qt5
2202d6
Requires:         python3-%{srcname} = %{version}-%{release}
2202d6
2202d6
%description -n python3-%{srcname}-qt5
2202d6
Qt5 integration for pyudev.
2202d6
2202d6
This package provides a module pyudev.pyqt5 that contains classes for
2202d6
integrating a pyudev monitor with the Qt5 main loop.
2202d6
2202d6
%prep
2202d6
%autosetup -n %{srcname}-%{version}
2202d6
rm -rf pyudev.egg-info
2202d6
2202d6
%build
2202d6
%if %{with python2}
2202d6
%py2_build
2202d6
%endif
2202d6
2202d6
%py3_build
2202d6
2202d6
%install
2202d6
%if %{with python2}
2202d6
%py2_install
2202d6
%endif
2202d6
2202d6
%py3_install
2202d6
2202d6
%if %{with python2}
2202d6
%files -n python2-%{srcname}
2202d6
%license COPYING
2202d6
%doc README.rst CHANGES.rst
2202d6
%{python2_sitelib}/pyudev/
2202d6
%{python2_sitelib}/pyudev-%{version}-*.egg-info
2202d6
%exclude %{python2_sitelib}/pyudev/glib.py*
2202d6
%exclude %{python2_sitelib}/pyudev/pyqt4.py*
2202d6
%exclude %{python2_sitelib}/pyudev/pyqt5.py*
2202d6
%exclude %{python2_sitelib}/pyudev/pyside.py*
2202d6
%exclude %{python2_sitelib}/pyudev/wx.py*
2202d6
2202d6
%files -n python2-%{srcname}-glib
2202d6
%license COPYING
2202d6
%{python2_sitelib}/pyudev/glib.py*
2202d6
2202d6
%if %{with qt4}
2202d6
%files -n python2-%{srcname}-qt4
2202d6
%license COPYING
2202d6
%{python2_sitelib}/pyudev/pyqt4.py*
2202d6
%endif
2202d6
2202d6
%files -n python2-%{srcname}-qt5
2202d6
%license COPYING
2202d6
%{python2_sitelib}/pyudev/pyqt5.py*
2202d6
2202d6
%files -n python2-%{srcname}-pyside
2202d6
%license COPYING
2202d6
%{python2_sitelib}/pyudev/pyside.py*
2202d6
2202d6
%files -n python2-%{srcname}-wx
2202d6
%license COPYING
2202d6
%{python2_sitelib}/pyudev/wx.py*
2202d6
%endif
2202d6
2202d6
%files -n python3-%{srcname}
2202d6
%license COPYING
2202d6
%doc README.rst CHANGES.rst
2202d6
%{python3_sitelib}/pyudev
2202d6
%{python3_sitelib}/pyudev-%{version}-*.egg-info
2202d6
%exclude %{python3_sitelib}/pyudev/glib.py
2202d6
%exclude %{python3_sitelib}/pyudev/__pycache__/glib.*
2202d6
%exclude %{python3_sitelib}/pyudev/pyqt4.py
2202d6
%exclude %{python3_sitelib}/pyudev/__pycache__/pyqt4.*
2202d6
%exclude %{python3_sitelib}/pyudev/pyqt5.py
2202d6
%exclude %{python3_sitelib}/pyudev/__pycache__/pyqt5.*
2202d6
%exclude %{python3_sitelib}/pyudev/pyside.py
2202d6
%exclude %{python3_sitelib}/pyudev/__pycache__/pyside.*
2202d6
%exclude %{python3_sitelib}/pyudev/wx.py
2202d6
%exclude %{python3_sitelib}/pyudev/__pycache__/wx.*
2202d6
2202d6
%if %{with qt4}
2202d6
%files -n python3-%{srcname}-qt4
2202d6
%license COPYING
2202d6
%{python3_sitelib}/pyudev/pyqt4.py
2202d6
%{python3_sitelib}/pyudev/__pycache__/pyqt4.*
2202d6
%endif
2202d6
2202d6
%files -n python3-%{srcname}-qt5
2202d6
%license COPYING
2202d6
%{python3_sitelib}/pyudev/pyqt5.py
2202d6
%{python3_sitelib}/pyudev/__pycache__/pyqt5.*
2202d6
2202d6
%changelog
2202d6
* Thu Jun 14 2018 Yaakov Selkowitz <yselkowi@redhat.com> - 0.21.0-7
2202d6
- Dropped qt4 from RHEL-8 (#1591123)
2202d6
2202d6
* Thu May 17 2018 Jaroslav Å karvada <jskarvad@redhat.com> - 0.21.0-6
2202d6
- Bumped release to fix conflict caused by automerge
2202d6
2202d6
* Mon Apr 30 2018 Jaroslav Å karvada <jskarvad@redhat.com> - 0.21.0-5
2202d6
- Dropped python2 from RHEL-8
2202d6
2202d6
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-4
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2202d6
2202d6
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-3
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2202d6
2202d6
* Wed Dec 21 2016 Kevin Fenzi <kevin@scrye.com> - 0.21.0-2
2202d6
- Rebuild for Python 3.6
2202d6
2202d6
* Fri Jul 29 2016 mulhern <amulhern@redhat.com> - 0.21.1
2202d6
- Deprecate use of Device object as mapping from udev property names to values
2202d6
- Add a Properties class and a Device.properties() method for udev properties
2202d6
- Fix places where Device object was incorrectly used in a boolean context
2202d6
- Return an empty string, not None, if the property value is an empty string
2202d6
- Exceptions re-raised from libudev calls now have a message string
2202d6
- Insert a warning about using a Device in a boolean context in docs
2202d6
- Infrastructure for vagrant tests is removed
2202d6
- Various internal refactorings
2202d6
- Extensive test improvements
2202d6
- Numerous documentation fixes
2202d6
2202d6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20.0-3
2202d6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2202d6
2202d6
* Mon May 2 2016 mulhern <amulhern@redhat.com> - 0.20.0
2202d6
- Remove parsing code added in previous release
2202d6
- No longer do CI for Python 2.6
2202d6
- Eliminate all wildcard imports and __all__ statements
2202d6
- No longer use deprecated Device.from_sys_path() method
2202d6
- Minor pylint induced changes
2202d6
- Documentation fixes
2202d6
2202d6
* Mon Feb 08 2016 mulhern <amulhern@redhat.com> - 0.19.0
2202d6
- Never raise a DeviceNotFoundError when iterating over a device enumeration
2202d6
- Device.subsystem() now returns None if device has no subsystem
2202d6
- Add DeprecationWarnings to deprecated Device methods
2202d6
- Replace "/" with "!" in Device.from_name() sys_name parameter
2202d6
- Add some unstable classes for parsing some kinds of values
2202d6
- Make version info more like Python's including micro numbers and levels
2202d6
- Refactor some internal modules into subdirectories
2202d6
- Work on tests and reproducers
2202d6
2202d6
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1-5
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2202d6
2202d6
* Mon Dec 21 2015 mulhern <amulhern@redhat.com> - 0.18.1
2202d6
- Restore raising KeyError in astring, asint, asbool methods in Attributes
2202d6
- Add dependency on six package
2202d6
- pyudev sources now in src directory
2202d6
- Added support for pyqt5 monitor observer
2202d6
- Added discover module, which looks up a device on limited information
2202d6
- DeviceNotFoundError is no longer a subtype of LookupError
2202d6
- Attributes class no longer extends Mapping class
2202d6
- Attributes class no longer inherits [] operator and other Mapping methods
2202d6
- Attributes class object are no longer iterable or indexable and have no length
2202d6
- Attributes.available_attributes property added
2202d6
- Attributes.get() method, with usual semantics explicitly defined
2202d6
- Device.from_* methods are deprecated, use Devices.from_* methods instead
2202d6
- Device.from_device_number() now raises DeviceNotFoundByNumberError
2202d6
- Devices.from_interface_index() method added
2202d6
- Devices.from_kernel_device() method added
2202d6
2202d6
* Thu Dec  3 2015 David Shea <dshea@redhat.com> - 0.17-4
2202d6
- Add requires for things that are required
2202d6
- Split the main-loop integration modules into separate packages
2202d6
2202d6
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 0.17-3
2202d6
- Rebuilt for Python3.5 rebuild
2202d6
2202d6
* Wed Sep 15 2015 David Shea <dshea@redhat.com> - 0.17.1-2
2202d6
- Fix a typo in the python3-pyudev Provides
2202d6
2202d6
* Mon Sep 14 2015 David Shea <dshea@redhat.com> - 0.17.1-1
2202d6
- Really start the monitor on pyudev.Monitor.poll()
2202d6
- Force non-blocking IO in pyudev.Monitor to avoid blocking on receiving the device
2202d6
- Set proper flags on pipe fs
2202d6
- Handle irregular polling events properly
2202d6
- Rename MonitorObserver GUI classes and deprecate the old ones
2202d6
- Remove patches for #1170337 and #1230773 that are now part of upstream
2202d6
- Switch to new packaging guidelines which renames python-pyudev to python2-pyudev
2202d6
2202d6
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-4
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2202d6
2202d6
* Fri Jun 12 2015 David Shea <dshea@redhat.com> - 0.16.1-3
2202d6
- Retry interrupted system calls (#1230773)
2202d6
- Rearrange the build process to match current packaging recommendations
2202d6
2202d6
* Wed Jan 28 2015 David Shea <dshea@redhat.com> - 0.16.1-2
2202d6
- Use %%license for the license file
2202d6
2202d6
* Wed Dec 10 2014 David Shea <dshea@redhat.com> - 0.16.1-1
2202d6
- Update to pyudev-0.16.1 (#880644)
2202d6
- Apply a patch from upstream to remove a global reference to libudev (#1170337)
2202d6
2202d6
* Wed Dec 10 2014 David Shea <dshea@redhat.com> - 0.15-7
2202d6
- Fix license tag (LGPL -> LGPLv2+) (#990579)
2202d6
- Remove rst tags from description
2202d6
- Remove unnecessary requires and buildrequires (#1095459)
2202d6
- Avoid packaging upstream egg-info files
2202d6
- Add a python3 package
2202d6
- Drop the Group tag which wasn't even the right group
2202d6
2202d6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-6
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2202d6
2202d6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-5
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2202d6
2202d6
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-4
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2202d6
2202d6
* Mon Jul 23 2012 Chris Lockfort <clockfort@redhat.com> 0.15-3
2202d6
- Reflect rawhide merging udev into systemd
2202d6
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-2
2202d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2202d6
* Mon Jun 18 2012 Chris Lockfort <clockfort@redhat.com> 0.15-1
2202d6
- initial package