]>
Commit | Line | Data |
---|---|---|
279ffc8b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
699c8ec6 AM |
6 | %define module pyusb |
7 | Summary: PyUSB provides USB access on the Python language | |
aeccd4dd | 8 | Summary(pl.UTF-8): PyUSB - dostęp do USB z poziomu języka Python |
699c8ec6 | 9 | Name: python-%{module} |
e212a934 | 10 | Version: 1.0.2 |
51e1d7e4 | 11 | Release: 6 |
07b11337 | 12 | License: BSD |
699c8ec6 | 13 | Group: Development/Languages/Python |
0efd3ed6 | 14 | Source0: http://downloads.sourceforge.net/pyusb/%{module}-%{version}.tar.gz |
e212a934 | 15 | # Source0-md5: 95bf0adc0f25bfb70daf86605cff2b3f |
cd5eea44 | 16 | URL: http://pyusb.sourceforge.net/ |
e8cc6ead | 17 | BuildRequires: rpm-pythonprov |
279ffc8b JB |
18 | BuildRequires: rpmbuild(macros) >= 1.714 |
19 | %if %{with python2} | |
20 | BuildRequires: python-devel >= 1:2.5 | |
64c86985 | 21 | BuildRequires: python-setuptools |
279ffc8b JB |
22 | %endif |
23 | %if %{with python3} | |
24 | BuildRequires: python3-devel >= 1:3.2 | |
64c86985 | 25 | BuildRequires: python3-setuptools |
279ffc8b JB |
26 | %endif |
27 | Requires: python-libs >= 1:2.5 | |
28 | Requires: libusb >= 1.0.0 | |
29 | BuildArch: noarch | |
699c8ec6 AM |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | PyUSB provides USB access on the Python language. | |
34 | ||
171e7b53 JR |
35 | %description -l pl.UTF-8 |
36 | PyUSB daje dostęp do USB z poziomu języka Python. | |
8093ecad | 37 | |
279ffc8b JB |
38 | %package -n python3-%{module} |
39 | Summary: PyUSB provides USB access on the Python language | |
40 | Summary(pl.UTF-8): PyUSB - dostęp do USB z poziomu języka Python | |
41 | Group: Development/Languages/Python | |
42 | Requires: python3-libs >= 1:3.2 | |
43 | Requires: libusb >= 1.0.0 | |
44 | ||
45 | %description -n python3-%{module} | |
46 | PyUSB provides USB access on the Python language. | |
47 | ||
48 | %description -n python3-%{module} -l pl.UTF-8 | |
49 | PyUSB daje dostęp do USB z poziomu języka Python. | |
50 | ||
699c8ec6 | 51 | %prep |
07b11337 | 52 | %setup -q -n %{module}-%{version} |
699c8ec6 AM |
53 | |
54 | %build | |
279ffc8b | 55 | %if %{with python2} |
516fd20d | 56 | %py_build |
279ffc8b JB |
57 | %endif |
58 | ||
59 | %if %{with python3} | |
60 | %py3_build | |
61 | %endif | |
699c8ec6 AM |
62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
279ffc8b JB |
66 | %if %{with python2} |
67 | %py_install | |
68 | ||
69 | %py_postclean | |
70 | %endif | |
71 | ||
72 | %if %{with python3} | |
73 | %py3_install | |
74 | %endif | |
699c8ec6 AM |
75 | |
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
279ffc8b | 79 | %if %{with python2} |
699c8ec6 AM |
80 | %files |
81 | %defattr(644,root,root,755) | |
e212a934 | 82 | %doc ACKNOWLEDGEMENTS LICENSE README.rst docs/*.rst |
279ffc8b JB |
83 | %{py_sitescriptdir}/usb |
84 | %{py_sitescriptdir}/pyusb-%{version}-py*.egg-info | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
88 | %files -n python3-%{module} | |
89 | %defattr(644,root,root,755) | |
e212a934 | 90 | %doc ACKNOWLEDGEMENTS LICENSE README.rst docs/*.rst |
279ffc8b JB |
91 | %{py3_sitescriptdir}/usb |
92 | %{py3_sitescriptdir}/pyusb-%{version}-py*.egg-info | |
93 | %endif |