Björn Esser 734911
%global pypi_name hidapi
aa3299
%global py_setup_args --with-system-hidapi
becc1b
%if 0%{?python3_version_nodots} > 37
becc1b
%global py3_so_suffix cpython-%{python3_version_nodots}-%{_arch}-%{_target_os}%{?_gnu}
becc1b
%else
becc1b
%global py3_so_suffix cpython-%{python3_version_nodots}m-%{_arch}-%{_target_os}%{?_gnu}
becc1b
%endif
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
Name:		python-%{pypi_name}
Björn Esser 0f8e7b
Version:	0.7.99.post20
f69312
Release:	13%{?dist}
Björn Esser 734911
Summary:	Interface to the %{pypi_name} library
Björn Esser 734911
Björn Esser 734911
License:	GPLv3+ or BSD or Public Domain
Björn Esser 734911
URL:		https://pypi.python.org/pypi/%{pypi_name}
Björn Esser 734911
Source0:	https://files.pythonhosted.org/packages/source/h/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Björn Esser 734911
c297f7
BuildRequires:  gcc
Björn Esser 0f8e7b
BuildRequires:	hidapi-devel
Björn Esser 734911
BuildRequires:	libusb-devel
Björn Esser 734911
BuildRequires:	libudev-devel
Björn Esser 734911
Björn Esser 734911
%description
Björn Esser 734911
%{summary}.
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%package -n python3-%{pypi_name}
Björn Esser 734911
Summary:	%{summary}
Björn Esser 734911
Björn Esser 734911
BuildRequires:	python3-Cython
Björn Esser 734911
BuildRequires:	python3-devel
Björn Esser 734911
BuildRequires:	python3-setuptools
Björn Esser 734911
Björn Esser 734911
%{?python_provide:%python_provide python3-%{pypi_name}}
Björn Esser 734911
Björn Esser 734911
%description -n python3-%{pypi_name}
Björn Esser 734911
%{summary}.
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%prep
Björn Esser 734911
%autosetup -n %{pypi_name}-%{version}
Björn Esser 0f8e7b
Björn Esser 0f8e7b
# Remove pre-built and bundled crap.
Björn Esser 0f8e7b
%{__rm} -fr %{pypi_name} %{pypi_name}.egg-info
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%build
aa3299
%py3_build
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%install
aa3299
%py3_install
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%check
Björn Esser 0f8e7b
export PYTHONPATH="%{buildroot}%{python3_sitearch}"
Björn Esser 0f8e7b
%{__python3} tests.py
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%files -n python3-%{pypi_name}
Björn Esser 734911
%license LICENSE*.txt
Björn Esser 0f8e7b
%doc PKG-INFO README.rst try.py
Björn Esser 734911
%{python3_sitearch}/hid.%{py3_so_suffix}.so
Björn Esser 734911
%{python3_sitearch}/hidraw.%{py3_so_suffix}.so
Björn Esser 734911
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
Björn Esser 734911
Björn Esser 734911
Björn Esser 734911
%changelog
f69312
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-13
f69312
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f69312
ee577d
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-12
ee577d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ee577d
22d20f
* Tue Jan 22 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.99.post20-11
22d20f
- Subpackage python2-hidapi has been removed
22d20f
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
22d20f
518172
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-10
518172
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
518172
e75b9a
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com>
e75b9a
- Rebuilt for Python 3.7
e75b9a
435bee
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com>
435bee
- Rebuilt for Python 3.7
435bee
dee7c8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-7
dee7c8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
dee7c8
e4bff7
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-6
e4bff7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
e4bff7
9c5418
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-5
9c5418
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9c5418
35071a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.99.post20-4
35071a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
35071a
f17a12
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.7.99.post20-3
f17a12
- Rebuild for Python 3.6
f17a12
Björn Esser 9bebce
* Sun Nov 06 2016 Björn Esser <fedora@besser82.io> - 0.7.99.post20-2
Björn Esser 9bebce
- Rebuilt for ppc64
Björn Esser 9bebce
Björn Esser 0f8e7b
* Sat Oct 29 2016 Björn Esser <fedora@besser82.io> - 0.7.99.post20-1
Björn Esser 0f8e7b
- Update to new release v0.7.99.post20
Björn Esser 0f8e7b
- Build against system hidapi
Björn Esser 0f8e7b
- Run testsuite
Björn Esser 0f8e7b
- Remove license-files from github, included in upstream-tarball
Björn Esser 0f8e7b
Björn Esser 734911
* Sat Oct 22 2016 Björn Esser <fedora@besser82.io> - 0.7.99.post19-1
Björn Esser 734911
- Initial import (rhbz 1387837)
Björn Esser 734911
Björn Esser 734911
* Fri Oct 21 2016 Björn Esser <fedora@besser82.io> - 0.7.99.post19-0.1
Björn Esser 734911
- Initial package (rhbz 1387837)