File python-hidapi.spec of Package python-hidapi
#
# spec file for package python-hidapi
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-hidapi
Version: 0.7.99.post21
Release: lp155.4.1
Summary: A Cython interface to the hidapi from https://githubcom/signal11/hidapi
License: GPL-3.0-only or BSD-3-Clause or SUSE-Permissive
URL: https://github.com/trezor/cython-hidapi
Source: https://files.pythonhosted.org/packages/source/h/hidapi/hidapi-%{version}.tar.gz
# PATCH-FIX-OPENSUSE python-hidapi-nosetuptools.patch aloisio@gmx.com -- remove the apparently pointless runtime setuptools requirement
Patch0: python-hidapi-nosetuptools.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(hidapi-hidraw)
BuildRequires: pkgconfig(hidapi-libusb)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libusb)
%python_subpackages
%description
A Cython interface to the hidapi from https://github.com/signal11/hidapi
%prep
%setup -q -n hidapi-%{version}
%patch0 -p1
%build
export CFLAGS="%{optflags}"
%python_build --with-system-hidapi
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%python_exec setup.py test
%files %{python_files}
%doc README.rst
%license LICENSE-bsd.txt LICENSE-gpl3.txt LICENSE-orig.txt LICENSE.txt
%{python_sitearch}/hid.*so
%{python_sitearch}/hidraw.*so
%{python_sitearch}/hidapi-%{version}-py%{python_version}.egg-info
%changelog
* Wed Mar 6 2024 Lubos Kocman <lubos.kocman@suse.com>
- Use sle15_python_module_pythons macro
* Thu Nov 14 2019 aloisio@gmx.com
- Added python-hidapi-nosetuptools.patch
- Spec cleanup
* Mon Jan 21 2019 Todd R <toddrme2178@gmail.com>
- Initial version