]> git.pld-linux.org Git - packages/python-pyudev.git/blame - python-pyudev.spec
- updated to 0.21.0
[packages/python-pyudev.git] / python-pyudev.spec
CommitLineData
5ebe7c80
JK
1#
2# Conditional build:
6d5cce0b 3%bcond_without doc # HTML documentation build
045a8fc9 4%bcond_with tests # py.test tests [requires functional udev with device db]
6d5cce0b
JB
5%bcond_without python2 # Python 2.x module
6%bcond_without python3 # Python 3.x module
68e55716 7#
5ebe7c80
JK
8%define module pyudev
9Summary: Pure Python binding for libudev
1bdf8250 10Summary(pl.UTF-8): Czysto pythonowe wiązanie do libudev
5ebe7c80 11Name: python-%{module}
045a8fc9
JB
12Version: 0.21.0
13Release: 1
5ebe7c80
JK
14License: LGPL v2.1+
15Group: Development/Languages/Python
87a313f3 16#Source0Download: https://pypi.python.org/simple/pyudev/
045a8fc9
JB
17Source0: https://files.pythonhosted.org/packages/source/p/pyudev/%{module}-%{version}.tar.gz
18# Source0-md5: cf4d9db7d772622144ca1be6b5d9353b
661d8857
JK
19#Source1: http://docs.python.org/2/objects.inv#/python-objects.inv
20Source1: python-objects.inv
21# Source1-md5: ad9c579afde0743e007b472cff7f1364
22#Source2: http://pytest.org/latest/objects.inv#/pytest-objects.inv
23Source2: pytest-objects.inv
24# Source2-md5: 0704c1b84755f3dd4d0cb782826791c6
25#Source3: https://deptinfo-ensip.univ-poitiers.fr/ENS/pyside-docs/objects.inv#/pyside-objects.inv
26Source3: pyside-objects.inv
68e55716
JB
27# Source3-md5: 8cc5c1ff0bb5ef9f4e9968c9b4a01984
28Patch0: %{name}-offline.patch
045a8fc9 29Patch1: %{name}-mock.patch
5ebe7c80 30URL: http://pyudev.readthedocs.org/
6d5cce0b 31%if %{with python2}
68e55716 32BuildRequires: python-devel >= 1:2.6
6d5cce0b 33BuildRequires: python-setuptools
87a313f3
JB
34%if %{with tests}
35BuildRequires: python-docutils >= 0.9
36BuildRequires: python-hypothesis
37BuildRequires: python-mock >= 1.0
38BuildRequires: python-pytest >= 2.8
045a8fc9 39BuildRequires: python-six
87a313f3 40%endif
6d5cce0b
JB
41%endif
42%if %{with python3}
43BuildRequires: python3-devel >= 1:3.2
44BuildRequires: python3-setuptools
87a313f3
JB
45%if %{with tests}
46BuildRequires: python3-docutils >= 0.9
47BuildRequires: python3-hypothesis
87a313f3 48BuildRequires: python3-pytest >= 2.8
045a8fc9 49BuildRequires: python3-six
87a313f3 50%endif
6d5cce0b 51%endif
5ebe7c80 52BuildRequires: rpm-pythonprov
045a8fc9 53BuildRequires: rpmbuild(macros) >= 1.714
68e55716
JB
54%if %{with doc}
55# for tests 1.0b1 is required, but for docs generation 0.8 is sufficient
68e55716
JB
56BuildRequires: python-mock >= 0.8
57BuildRequires: python-sphinxcontrib-issuetracker >= 0.9
58BuildRequires: python-pytest >= 2.2
016b8225 59BuildRequires: sphinx-pdg-2 >= 1.0.7
68e55716 60%endif
87a313f3 61Requires: python-modules >= 1:2.6
d0eb8ae6 62Requires: udev-libs >= 1:151
5ebe7c80
JK
63BuildArch: noarch
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%description
67pyudev is a LGPL licensed, pure Python binding for libudev, the device
68and hardware management and information library for Linux. It supports
69almost all libudev functionality, you can enumerate devices, query
70device properties and attributes or monitor devices, including
71asynchronous monitoring with threads, or within the event loops of Qt,
1bdf8250
JB
72GLib or wxPython.
73
74%description -l pl.UTF-8
75pyudev to wydane na licencji LGPL czysto pythonowe wiązanie do libudev
76- biblioteki zarządzania urządzeniami i sprzętem dla Linuksa.
77Obsługuje prawie całą funkcjonalność libudev, potrafi wyliczać
78urządzenia, odpytywać o właściwości i atrybuty urządzeń oraz
79monitorować urządzenia, włącznie z asynchronicznym monitorowaniem z
80użyciem wątków albo wewnątrz pętli zdarzeń Qt, GLiba czy wxPythona.
5ebe7c80 81
698ed59f
JK
82%package -n python3-%{module}
83Summary: Pure Python binding for libudev
84Summary(pl.UTF-8): Czysto pythonowe wiązanie do libudev
85Group: Development/Languages/Python
87a313f3 86Requires: python3-modules >= 1:3.2
698ed59f
JK
87
88%description -n python3-%{module}
89pyudev is a LGPL licensed, pure Python binding for libudev, the device
90and hardware management and information library for Linux. It supports
91almost all libudev functionality, you can enumerate devices, query
92device properties and attributes or monitor devices, including
93asynchronous monitoring with threads, or within the event loops of Qt,
94GLib or wxPython.
95
96%description -n python3-%{module} -l pl.UTF-8
97pyudev to wydane na licencji LGPL czysto pythonowe wiązanie do libudev
98- biblioteki zarządzania urządzeniami i sprzętem dla Linuksa.
99Obsługuje prawie całą funkcjonalność libudev, potrafi wyliczać
100urządzenia, odpytywać o właściwości i atrybuty urządzeń oraz
101monitorować urządzenia, włącznie z asynchronicznym monitorowaniem z
102użyciem wątków albo wewnątrz pętli zdarzeń Qt, GLiba czy wxPythona.
103
5ebe7c80
JK
104%prep
105%setup -q -n %{module}-%{version}
68e55716 106%patch0 -p1
045a8fc9 107%patch1 -p1
68e55716
JB
108
109cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} doc
5ebe7c80
JK
110
111%build
698ed59f 112%if %{with python2}
045a8fc9
JB
113%py_build
114
115%{?with_tests:PYTHONPATH=$(pwd):$(pwd)/build-2/lib %{__python} -m pytest tests}
698ed59f 116%endif
5ebe7c80 117
698ed59f 118%if %{with python3}
045a8fc9
JB
119%py3_build
120
121%{?with_tests:PYTHONPATH=$(pwd):$(pwd)/build-3/lib %{__python3} -m pytest tests}
698ed59f 122%endif
5ebe7c80 123
68e55716 124%if %{with doc}
87a313f3 125PYTHONPATH=build-2/lib \
016b8225 126sphinx-build-2 -b html -d doc/_doctrees doc doc/html
68e55716
JB
127%endif
128
5ebe7c80
JK
129%install
130rm -rf $RPM_BUILD_ROOT
87a313f3 131
698ed59f 132%if %{with python2}
25273f8a 133%py_install
6d5cce0b 134
87a313f3 135%py_postclean
698ed59f 136%endif
87a313f3 137
698ed59f 138%if %{with python3}
25273f8a 139%py3_install
698ed59f 140%endif
5ebe7c80
JK
141
142%clean
143rm -rf $RPM_BUILD_ROOT
144
698ed59f 145%if %{with python2}
5ebe7c80
JK
146%files
147%defattr(644,root,root,755)
68e55716 148%doc CHANGES.rst README.rst %{?with_doc:doc/html}
87a313f3 149%{py_sitescriptdir}/pyudev
1bdf8250 150%{py_sitescriptdir}/pyudev-%{version}-py*.egg-info
698ed59f
JK
151%endif
152
153%if %{with python3}
154%files -n python3-%{module}
155%defattr(644,root,root,755)
156%doc CHANGES.rst README.rst %{?with_doc:doc/html}
87a313f3 157%{py3_sitescriptdir}/pyudev
698ed59f
JK
158%{py3_sitescriptdir}/pyudev-%{version}-py*.egg-info
159%endif
This page took 0.10998 seconds and 4 git commands to generate.