]> git.pld-linux.org Git - packages/python-pyusb.git/blob - python-pyusb.spec
8c2c4387e205f50fd91c3c94895b6c6217d88627
[packages/python-pyusb.git] / python-pyusb.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define module  pyusb
7 Summary:        PyUSB provides USB access on the Python language
8 Summary(pl.UTF-8):      PyUSB - dostęp do USB z poziomu języka Python
9 Name:           python-%{module}
10 Version:        1.0.2
11 Release:        4
12 License:        BSD
13 Group:          Development/Languages/Python
14 Source0:        http://downloads.sourceforge.net/pyusb/%{module}-%{version}.tar.gz
15 # Source0-md5:  95bf0adc0f25bfb70daf86605cff2b3f
16 URL:            http://pyusb.sourceforge.net/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.5
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.2
25 BuildRequires:  python3-setuptools
26 %endif
27 Requires:       python-libs >= 1:2.5
28 Requires:       libusb >= 1.0.0
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 PyUSB provides USB access on the Python language.
34
35 %description -l pl.UTF-8
36 PyUSB daje dostęp do USB z poziomu języka Python.
37
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
51 %prep
52 %setup -q -n %{module}-%{version}
53
54 %build
55 %if %{with python2}
56 %py_build
57 %endif
58
59 %if %{with python3}
60 %py3_build
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 %if %{with python2}
67 %py_install
68
69 %py_postclean
70 %endif
71
72 %if %{with python3}
73 %py3_install
74 %endif
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %files
81 %defattr(644,root,root,755)
82 %doc ACKNOWLEDGEMENTS LICENSE README.rst docs/*.rst
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)
90 %doc ACKNOWLEDGEMENTS LICENSE README.rst docs/*.rst
91 %{py3_sitescriptdir}/usb
92 %{py3_sitescriptdir}/pyusb-%{version}-py*.egg-info
93 %endif
This page took 0.065179 seconds and 2 git commands to generate.