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