]> git.pld-linux.org Git - packages/python-hidapi.git/blame - python-hidapi.spec
- setuptools epoch
[packages/python-hidapi.git] / python-hidapi.spec
CommitLineData
0d5816eb
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Cython interface to HIDAPI library
8Summary(pl.UTF-8): Cythonowy interfejs do biblioteki HIDAPI
9Name: python-hidapi
c1520900
JB
10# 0.9.0.post3 requires hidapi > 0.9.0
11Version: 0.9.0.post2
9552d78e 12Release: 3
0d5816eb
JB
13License: GPL v3 or BSD or HIDAPI
14Group: Libraries/Python
c1520900 15#Source0Download: https://pypi.org/simple/hidapi/
0d5816eb 16Source0: https://files.pythonhosted.org/packages/source/h/hidapi/hidapi-%{version}.tar.gz
c1520900 17# Source0-md5: 73797981acc762bd39f6ceb5a0b0b0b7
0d5816eb 18URL: https://pypi.org/project/hidapi/
c1520900 19BuildRequires: hidapi-devel >= 0.9.0
0d5816eb
JB
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-Cython
24BuildRequires: python-devel >= 1:2.6
04fa15ae 25BuildRequires: python-setuptools >= 1:19.0
0d5816eb
JB
26%endif
27%if %{with python3}
28BuildRequires: python3-Cython
29BuildRequires: python3-devel >= 1:3.2
04fa15ae 30BuildRequires: python3-setuptools >= 1:19.0
0d5816eb 31%endif
c1520900 32Requires: hidapi >= 0.9.0
0d5816eb
JB
33Requires: python-libs >= 1:2.6
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37Cython interface to HIDAPI library.
38
39%description -l pl.UTF-8
40Cythonowy interfejs do biblioteki HIDAPI.
41
42%package -n python3-hidapi
43Summary: Cython interface to HIDAPI library
44Summary(pl.UTF-8): Cythonowy interfejs do biblioteki HIDAPI
45Group: Libraries/Python
c1520900 46Requires: hidapi >= 0.9.0
0d5816eb
JB
47Requires: python3-libs >= 1:3.2
48
49%description -n python3-hidapi
50Cython interface to HIDAPI library.
51
52%description -n python3-hidapi -l pl.UTF-8
53Cythonowy interfejs do biblioteki HIDAPI.
54
55%prep
56%setup -q -n hidapi-%{version}
57
58%build
59%if %{with python2}
60%py_build \
61 --with-system-hidapi
62
63%if %{with tests}
64PYTHONPATH=$(echo build-2/lib.*) \
65%{__python} -m unittest tests
66%endif
67%endif
68
69%if %{with python3}
70%py3_build \
71 --with-system-hidapi
72
73%if %{with tests}
74PYTHONPATH=$(echo build-3/lib.*) \
75%{__python3} -m unittest tests
76%endif
77%endif
78
79%install
80rm -rf $RPM_BUILD_ROOT
81
82%if %{with python2}
83%py_install
84
85%py_postclean
86%endif
87
88%if %{with python3}
89%py3_install
90%endif
91
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%if %{with python2}
96%files
97%defattr(644,root,root,755)
98%doc LICENSE.txt LICENSE-bsd.txt LICENSE-orig.txt README.rst
99%attr(755,root,root) %{py_sitedir}/hid.so
100%attr(755,root,root) %{py_sitedir}/hidraw.so
101%{py_sitedir}/hidapi-%{version}-py*.egg-info
102%endif
103
104%if %{with python3}
105%files -n python3-hidapi
106%defattr(644,root,root,755)
107%doc LICENSE.txt LICENSE-bsd.txt LICENSE-orig.txt README.rst
108%attr(755,root,root) %{py3_sitedir}/hid.cpython-*.so
109%attr(755,root,root) %{py3_sitedir}/hidraw.cpython-*.so
110%{py3_sitedir}/hidapi-%{version}-py*.egg-info
111%endif
This page took 0.05171 seconds and 4 git commands to generate.