2019-04-18 07:40:34 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-libusb1
|
|
|
|
|
#
|
2025-01-22 13:01:50 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2019-04-18 07:40:34 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2019-05-15 21:58:00 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-04-18 07:40:34 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2025-06-30 12:58:34 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-04-18 07:40:34 +00:00
|
|
|
Name: python-libusb1
|
2025-04-11 12:45:51 +00:00
|
|
|
Version: 3.3.1
|
2019-04-18 07:40:34 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Python wrapper for libusb-1.0
|
|
|
|
|
# Relicensed from GPL to LGPLv2.1+ in May 2015
|
|
|
|
|
# https://github.com/vpelletier/python-libusb1/commit/238eaefa0759622afc554884b4b333d9bf946c65
|
|
|
|
|
License: LGPL-2.1-or-later
|
2019-05-15 21:58:00 +00:00
|
|
|
URL: https://github.com/vpelletier/%{name}
|
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/l/libusb1/libusb1-%{version}.tar.gz
|
2025-06-30 12:58:34 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-04-18 07:40:34 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-06-30 12:58:34 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-04-18 07:40:34 +00:00
|
|
|
BuildRequires: fdupes
|
2023-12-08 08:19:55 +00:00
|
|
|
BuildRequires: libusb-1_0-0 >= 1.0.21
|
2019-04-18 07:40:34 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2023-12-08 08:19:55 +00:00
|
|
|
Requires: libusb-1_0-0 >= 1.0.21
|
2019-04-18 07:40:34 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This is a pure python wrapper for libusb-1.0.
|
|
|
|
|
|
|
|
|
|
%prep
|
2024-12-02 14:03:04 +00:00
|
|
|
%autosetup -p1 -n libusb1-%{version}
|
2021-01-20 10:27:58 +00:00
|
|
|
sed -i '/wheel/d' setup.py
|
|
|
|
|
|
2019-04-18 07:40:34 +00:00
|
|
|
sed -i '1{/^#!/d}' examples/*.py
|
|
|
|
|
chmod a-x examples/*.py
|
|
|
|
|
|
|
|
|
|
%build
|
2025-06-30 12:58:34 +00:00
|
|
|
%pyproject_wheel
|
2019-04-18 07:40:34 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-06-30 12:58:34 +00:00
|
|
|
%pyproject_install
|
2019-04-18 07:40:34 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2021-01-20 10:27:58 +00:00
|
|
|
%python_exec -m usb1.testUSB1 -v
|
2019-04-18 07:40:34 +00:00
|
|
|
|
2019-05-15 21:58:00 +00:00
|
|
|
%files %{python_files}
|
2019-04-18 07:40:34 +00:00
|
|
|
%doc README.rst examples/
|
|
|
|
|
%license COPYING.LESSER
|
2024-12-02 14:03:04 +00:00
|
|
|
%{python_sitelib}/libusb1.py
|
|
|
|
|
%{python_sitelib}/usb1
|
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/libusb1*
|
|
|
|
|
%{python_sitelib}/libusb1-%{version}*info
|
2019-04-18 07:40:34 +00:00
|
|
|
|
|
|
|
|
%changelog
|