%global pypiname Send2Trash Name: python-send2trash Version: 1.4.2 Release: 1%{?dist} Summary: Python library to natively send files to Trash License: BSD URL: https://github.com/hsoft/send2trash Source0: https://files.pythonhosted.org/packages/source/s/send2trash/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python3-devel %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 %{?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 %{?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 %{pypiname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %files -n python2-send2trash %doc README.rst CHANGES.rst %{python2_sitelib}/* %files -n python3-send2trash %doc README.rst CHANGES.rst %{python3_sitelib}/* %changelog * Tue Dec 26 2017 williamjmorenor@gmail.com - 1.4.2-1 - Initial Packaging