%global srcname libusb1 %global sum Pure-python wrapper for libusb-1.0 Name: python-%{srcname} Version: 1.6.4 Release: 1%{?dist} Summary: %{sum} License: LGPLv2+ URL: https://github.com/vpelletier/python-libusb1 Source0: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel python3-devel BuildRequires: libusb-devel BuildRequires: libusbx-devel %description Pure-python wrapper for libusb-1.0. Supports all transfer types, both in synchronous and asynchronous mode. %package -n python2-%{srcname} Requires: (libusb1 or libusbx) Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Pure-python wrapper for libusb-1.0. Supports all transfer types, both in synchronous and asynchronous mode. %package -n python3-%{srcname} Requires: (libusb1 or libusbx) Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} Pure-python wrapper for libusb-1.0. Supports all transfer types, both in synchronous and asynchronous mode. %prep %autosetup -n %{srcname}-%{version} rm -rf %{srcname}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{srcname} %license COPYING COPYING.LESSER %doc README.rst %{python2_sitelib}/* %files -n python3-%{srcname} %license COPYING COPYING.LESSER %doc README.rst %{python3_sitelib}/* %changelog * Tue Mar 20 2018 Jonny Heggheim - 1.6.4-1 - Inital version