From ba84b74220a9c12d8c53c32b1cf84f8f97ed011007dce113fc182074ec1ed750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 6 Mar 2019 10:43:29 +0000 Subject: [PATCH] - Update to 1.5.0: * More specific error when failing to create XDG fallback trash directory (#20) * Windows: Workaround for long paths (#23) - Add patch to test properly under python2: * python2.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Send2Trash?expand=0&rev=7 --- Send2Trash-1.4.1.tar.gz | 3 --- Send2Trash-1.5.0.tar.gz | 3 +++ python-Send2Trash.changes | 9 +++++++++ python-Send2Trash.spec | 17 +++++++++-------- python2.patch | 26 ++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 11 deletions(-) delete mode 100644 Send2Trash-1.4.1.tar.gz create mode 100644 Send2Trash-1.5.0.tar.gz create mode 100644 python2.patch diff --git a/Send2Trash-1.4.1.tar.gz b/Send2Trash-1.4.1.tar.gz deleted file mode 100644 index da0db3a..0000000 --- a/Send2Trash-1.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:55e70d96b61a6c05911c96bb14ef313d5dc70d3e0197929dcc868870b58a1196 -size 6068 diff --git a/Send2Trash-1.5.0.tar.gz b/Send2Trash-1.5.0.tar.gz new file mode 100644 index 0000000..2b5119d --- /dev/null +++ b/Send2Trash-1.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60001cc07d707fe247c94f74ca6ac0d3255aabcb930529690897ca2a39db28b2 +size 10892 diff --git a/python-Send2Trash.changes b/python-Send2Trash.changes index d1c705d..2434a06 100644 --- a/python-Send2Trash.changes +++ b/python-Send2Trash.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Mar 6 10:34:17 UTC 2019 - Tomáš Chvátal + +- Update to 1.5.0: + * More specific error when failing to create XDG fallback trash directory (#20) + * Windows: Workaround for long paths (#23) +- Add patch to test properly under python2: + * python2.patch + ------------------------------------------------------------------- Wed Dec 19 00:27:32 UTC 2018 - Jan Engelhardt diff --git a/python-Send2Trash.spec b/python-Send2Trash.spec index 7e54461..e62b91c 100644 --- a/python-Send2Trash.spec +++ b/python-Send2Trash.spec @@ -1,7 +1,7 @@ # # spec file for package python-Send2Trash # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,20 +18,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} # test scripts missing -%bcond_with test %define oldpython python Name: python-Send2Trash -Version: 1.4.1 +Version: 1.5.0 Release: 0 Summary: Python library to send files to the Trash location License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/hsoft/send2trash Source: https://files.pythonhosted.org/packages/source/S/Send2Trash/Send2Trash-%{version}.tar.gz +Patch0: python2.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Recommends: python-gobject +Requires: typelib(GObject) +Requires: typelib(Gio) %ifpython2 Obsoletes: %{oldpython}-send2trash < %{version} Provides: %{oldpython}-send2trash = %{version} @@ -51,6 +52,7 @@ freedesktop.org. %prep %setup -q -n Send2Trash-%{version} +%patch0 -p1 %build %python_build @@ -59,13 +61,12 @@ freedesktop.org. %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check -%python_exec setup.py test -%endif +export LANG=en_US.UTF8 +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m unittest discover %files %{python_files} -%defattr(-,root,root,-) +%license LICENSE %doc CHANGES.rst README.rst %{python_sitelib}/* diff --git a/python2.patch b/python2.patch new file mode 100644 index 0000000..f05664c --- /dev/null +++ b/python2.patch @@ -0,0 +1,26 @@ +From 74352462f5df2cb5708b96458b81afef3070c800 Mon Sep 17 00:00:00 2001 +From: Virgil Dupras +Date: Thu, 26 Jul 2018 08:30:39 -0400 +Subject: [PATCH] Fix broken tests on py2 + +--- + tests/test_plat_other.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/test_plat_other.py b/tests/test_plat_other.py +index b94295d..ae4f391 100644 +--- a/tests/test_plat_other.py ++++ b/tests/test_plat_other.py +@@ -6,7 +6,11 @@ + import send2trash.plat_other + from send2trash.plat_other import send2trash as s2t + from send2trash.compat import PY3 +-from configparser import ConfigParser ++try: ++ from configparser import ConfigParser ++except ImportError: ++ # py2 ++ from ConfigParser import ConfigParser + from tempfile import mkdtemp, NamedTemporaryFile, mktemp + import shutil + import stat