2017-10-26 05:03:36 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-Send2Trash
|
|
|
|
#
|
2018-12-04 15:01:57 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-10-26 05:03:36 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-04 15:01:57 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2017-10-26 05:03:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
# test scripts missing
|
|
|
|
%bcond_with test
|
|
|
|
%define oldpython python
|
|
|
|
Name: python-Send2Trash
|
|
|
|
Version: 1.4.1
|
|
|
|
Release: 0
|
|
|
|
Summary: Send file to trash natively under Mac OS X, Windows and Linux
|
2018-12-04 15:01:57 +01:00
|
|
|
License: BSD-3-Clause
|
2017-10-26 05:03:36 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-12-04 15:01:57 +01:00
|
|
|
Url: https://github.com/hsoft/send2trash
|
2017-10-26 05:03:36 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/S/Send2Trash/Send2Trash-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2018-12-04 15:01:57 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-10-26 05:03:36 +02:00
|
|
|
Recommends: python-gobject
|
|
|
|
%ifpython2
|
|
|
|
Obsoletes: %{oldpython}-send2trash < %{version}
|
|
|
|
Provides: %{oldpython}-send2trash = %{version}
|
|
|
|
%endif
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n Send2Trash-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%if %{with test}
|
|
|
|
%check
|
|
|
|
%python_exec setup.py test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc CHANGES.rst README.rst
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|