%global pypi_name send2trash Name: python-%{pypi_name} Version: 1.4.2 Release: 1%{?dist} Summary: Python library for sending files to trash natively License: BSD URL: https://github.com/hsoft/send2trash # PyPI sdist lacks tests Source0: %url/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-configparser BuildRequires: python3-devel BuildRequires: python3-setuptools %description Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. %package -n python2-%{pypi_name} Summary: %{summary} Provides: python2-Send2Trash = %{version}-%{release} %{?python_provide:%python_provide python2-%{pypi_name}} %{?python_provide:%python_provide python2-Send2Trash} %description -n python2-%{pypi_name} Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. Python 2 version. %package -n python3-%{pypi_name} Summary: %{summary} Provides: python3-Send2Trash = %{version}-%{release} %{?python_provide:%python_provide python3-%{pypi_name}} %{?python_provide:%python_provide python3-Send2Trash} %description -n python3-%{pypi_name} Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. Python 3 version. %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{pypi_name} %license LICENSE %doc README.rst CHANGES.rst %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/Send2Trash-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %license LICENSE %doc README.rst CHANGES.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/Send2Trash-%{version}-py?.?.egg-info %changelog * Tue Jan 09 2018 Miro HronĨok - 1.4.2-1 - Initial package