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