%global pypiname Send2Trash Name: python-send2trash Version: 1.4.2 Release: 0%{?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-%{pypiname} Summary: Python library to natively send files to Trash %{?python_provide:%python_provide python2-%{pypiname}} %description -n python2-%{pypiname} 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-%{pypiname} Summary: Python library to natively send files to Trash %{?python_provide:%python_provide python3-%{pypiname}} %description -n python3-%{pypiname} 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-%{pypiname} %doc README.rst CHANGES.rst %{python2_sitelib}/* %files -n python3-%{pypiname} %doc README.rst CHANGES.rst %{python3_sitelib}/* %changelog * Mon Dec 25 2017 williamjmorenor@gmail.com - 0.12.0-1 - Initial packaging Skip docs build with sphinx because a lot of extensions