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