From 0e19fc3fc22c570b0c2313dbb1773ff1c013349d6c96b08ae85ea37ea94640a4 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 4 Jan 2022 14:19:57 +0000 Subject: [PATCH] Accepting request 943767 from home:bnavigator:branches:devel:languages:python - Update to 1.8.0 * Add compatibility with pathlib paths (#49) * Fix thread compatibility of modern windows implementation (#59) * Fix handling of UNC names in legacy windows implementation (#57) - Release Version 1.7.1 * Fix handling of UNC names (#57) * Changed conditional for when to try to use pyobjc version (#51) * Add console_script entry point (#50) * Increased python CI versions (#52, #54) * Fix minor issue in setup.py (#53) * Fix issue with windows tests importing modules on non-windows (#55) * Unit test cleanups, rewrites, and flake8 cleanups * Windows: Fix legacy windows platform for multi-byte unicode and add tests * macOS: Add alternative pyobjc version to potentially improve compatibility (#51) * Add main method which allows calling via python -m send2trash somefile * Windows: Add support for using IFileOperation when pywin32 is present on Vista and newer * Add support for passing multiple files at once in a list * Windows: Batch multi-file calls to improve performance (#42) * Windows: Fix issue with SHFileOperation failing silently when path is not found (#33) - Drop python2.patch OBS-URL: https://build.opensuse.org/request/show/943767 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Send2Trash?expand=0&rev=9 --- Send2Trash-1.5.0.tar.gz | 3 --- Send2Trash-1.8.0-gh.tar.gz | 3 +++ python-Send2Trash.changes | 31 +++++++++++++++++++++++++++++++ python-Send2Trash.spec | 28 +++++++++++++++++++--------- python2.patch | 26 -------------------------- 5 files changed, 53 insertions(+), 38 deletions(-) delete mode 100644 Send2Trash-1.5.0.tar.gz create mode 100644 Send2Trash-1.8.0-gh.tar.gz delete mode 100644 python2.patch diff --git a/Send2Trash-1.5.0.tar.gz b/Send2Trash-1.5.0.tar.gz deleted file mode 100644 index 2b5119d..0000000 --- a/Send2Trash-1.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60001cc07d707fe247c94f74ca6ac0d3255aabcb930529690897ca2a39db28b2 -size 10892 diff --git a/Send2Trash-1.8.0-gh.tar.gz b/Send2Trash-1.8.0-gh.tar.gz new file mode 100644 index 0000000..6f44bf9 --- /dev/null +++ b/Send2Trash-1.8.0-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:937b038abd9f1e7b8c5d7a116be5dc4663beb71df74dcccffe56cacf992c7a9c +size 15040 diff --git a/python-Send2Trash.changes b/python-Send2Trash.changes index 2434a06..c1e6faa 100644 --- a/python-Send2Trash.changes +++ b/python-Send2Trash.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Tue Jan 4 13:28:21 UTC 2022 - Ben Greiner + +- Update to 1.8.0 + * Add compatibility with pathlib paths (#49) + * Fix thread compatibility of modern windows implementation (#59) + * Fix handling of UNC names in legacy windows implementation + (#57) +- Release Version 1.7.1 + * Fix handling of UNC names (#57) + * Changed conditional for when to try to use pyobjc version (#51) + * Add console_script entry point (#50) + * Increased python CI versions (#52, #54) + * Fix minor issue in setup.py (#53) + * Fix issue with windows tests importing modules on non-windows + (#55) + * Unit test cleanups, rewrites, and flake8 cleanups + * Windows: Fix legacy windows platform for multi-byte unicode and + add tests + * macOS: Add alternative pyobjc version to potentially improve + compatibility (#51) + * Add main method which allows calling via python -m send2trash + somefile + * Windows: Add support for using IFileOperation when pywin32 is + present on Vista and newer + * Add support for passing multiple files at once in a list + * Windows: Batch multi-file calls to improve performance (#42) + * Windows: Fix issue with SHFileOperation failing silently when + path is not found (#33) +- Drop python2.patch + ------------------------------------------------------------------- Wed Mar 6 10:34:17 UTC 2019 - Tomáš Chvátal diff --git a/python-Send2Trash.spec b/python-Send2Trash.spec index e62b91c..f2b31ca 100644 --- a/python-Send2Trash.spec +++ b/python-Send2Trash.spec @@ -1,7 +1,7 @@ # # spec file for package python-Send2Trash # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,19 +20,21 @@ # test scripts missing %define oldpython python Name: python-Send2Trash -Version: 1.5.0 +Version: 1.8.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 +URL: https://github.com/arsenetar/send2trash +Source: https://github.com/arsenetar/send2trash/archive/refs/tags/%{version}.tar.gz#/Send2Trash-%{version}-gh.tar.gz +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: typelib(GObject) Requires: typelib(Gio) +Requires(post): update-alternatives +Requires(postun):update-alternatives %ifpython2 Obsoletes: %{oldpython}-send2trash < %{version} Provides: %{oldpython}-send2trash = %{version} @@ -51,23 +53,31 @@ to its own implementation of the trash specifications from freedesktop.org. %prep -%setup -q -n Send2Trash-%{version} -%patch0 -p1 +%setup -q -n send2trash-%{version} %build %python_build %install %python_install +%python_clone -a %{buildroot}%{_bindir}/send2trash %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG=en_US.UTF8 -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m unittest discover +%pytest + +%post +%python_install_alternative send2trash + +%postun +%python_uninstall_alternative send2trash %files %{python_files} %license LICENSE %doc CHANGES.rst README.rst -%{python_sitelib}/* +%python_alternative %{_bindir}/send2trash +%{python_sitelib}/send2trash +%{python_sitelib}/Send2Trash-%{version}*-info %changelog diff --git a/python2.patch b/python2.patch deleted file mode 100644 index f05664c..0000000 --- a/python2.patch +++ /dev/null @@ -1,26 +0,0 @@ -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