14
0
forked from pool/python-pyusb

Accepting request 694884 from home:jayvdb:branches:devel:languages:python

- Activate tests using GitHub archive
- Add fdupes
- Add Requires libusb-1_0-1

OBS-URL: https://build.opensuse.org/request/show/694884
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyusb?expand=0&rev=3
This commit is contained in:
Tomáš Chvátal
2019-04-17 08:46:24 +00:00
committed by Git OBS Bridge
parent e83825ba3a
commit cf8bc5f716
3 changed files with 18 additions and 5 deletions

View File

@@ -25,10 +25,13 @@ Summary: USB access on the Python language
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/pyusb/pyusb
Source: https://files.pythonhosted.org/packages/source/p/pyusb/pyusb-%{version}.tar.gz
Source: https://github.com/pyusb/pyusb/archive/v%{version}.tar.gz#/pyusb-%{version}.tar.gz
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module setuptools}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: libusb-1_0-0
BuildArch: noarch
Provides: python-usb = %{version}-%{release}
Obsoletes: python-usb < %{version}-%{release}
@@ -47,13 +50,16 @@ find . -name "*.rst" -exec dos2unix {} +
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Tests are neither available nor useable gh#pyusb/pyusb#235
# Testing mostly requires a device, which is not mocked or emulated
# See https://github.com/pyusb/pyusb/issues/235
%python_exec setup.py pytest --addopts="tests/test_find.py tests/test_util.py -k 'not FindDescriptorTest'"
%files %{python_files}
%license LICENSE
%doc ACKNOWLEDGEMENTS ChangeLog README.rst docs/*
%doc ACKNOWLEDGEMENTS README.rst docs/*
%{python_sitelib}/*
%changelog