%global pypiname Send2Trash Name: python-send2trash Version: 1.4.2 Release: 3%{?dist} Summary: Python library to natively send files to Trash License: BSD URL: https://github.com/hsoft/send2trash # PyPI sdist lacks tests Source0: %url/archive/%{version}/%{pypiname}-%{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. On OS X, it uses native FSMoveObjectToTrashSync Cocoa calls, on Windows, it uses native (and ugly) SHFileOperation win32 calls. On other platforms, if PyGObject and GIO are available, it will use this. Otherwise, it will fallback to its own implementation of the trash specifications from freedesktop.org. %package -n python2-send2trash Summary: Python library to natively send files to Trash Provides: python2-%{pypiname} == %{version}-%{release} %{?python_provide:%python_provide python2-%{pypiname}} %{?python_provide:%python_provide python2-send2trash} %description -n python2-send2trash Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. On OS X, it uses native FSMoveObjectToTrashSync Cocoa calls, on Windows, it uses native (and ugly) SHFileOperation win32 calls. On other platforms, if PyGObject and GIO are available, it will use this. Otherwise, it will fallback to its own implementation of the trash specifications from freedesktop.org. %package -n python3-send2trash Summary: Python library to natively send files to Trash Provides: python3-%{pypiname} == %{version}-%{release} %{?python_provide:%python_provide python3-%{pypiname}} %{?python_provide:%python_provide python3-send2trash} %description -n python3-send2trash Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. On OS X, it uses native FSMoveObjectToTrashSync Cocoa calls, on Windows, it uses native (and ugly) SHFileOperation win32 calls. On other platforms, if PyGObject and GIO are available, it will use this. Otherwise, it will fallback to its own implementation of the trash specifications from freedesktop.org. %prep %setup -q -n send2trash-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-send2trash %license LICENSE %doc README.rst CHANGES.rst %{python2_sitelib}/send2trash/ %{python2_sitelib}/%{pypiname}-%{version}-py?.?.egg-info %files -n python3-send2trash %license LICENSE %doc README.rst CHANGES.rst %{python3_sitelib}/send2trash/ %{python3_sitelib}/%{pypiname}-%{version}-py?.?.egg-info %changelog * Tue Jan 09 2018 Miro HronĨok - 1.4.2-3 - Run tests, use GH tarball - Be more explicit in %%files - Add plain pythonX-%%{pypiname} provides - Correct a typo in Python 2 python_provide * Sat Jan 06 2018 williamjmorenor@gmail.com - 1.4.2-2 - Initial import of BZ#1529027 * Tue Dec 26 2017 williamjmorenor@gmail.com - 1.4.2-1 - Initial Packaging