Sync from SUSE:SLFO:Main python-fs revision 9380609e1fdd9eb9a31cff045507a45c
This commit is contained in:
parent
8c2ad057d8
commit
d08d1a218d
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jun 30 20:36:23 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- drop scandir dependency (only for < 3.5)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 19 06:10:10 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to autosetup and pyproject macros
|
||||||
|
- Add patch support-python-312.patch, don't call a removed assertion
|
||||||
|
function
|
||||||
|
- Skip some recalcitrant tests
|
||||||
|
- Clean up some old Python 3 version requirements
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 21 12:25:31 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:25:31 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
@ -29,7 +43,7 @@ Sat Mar 26 21:28:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
|||||||
- Fixed `MemoryFS.move` and `MemoryFS.movedir` not updating the name of moved
|
- Fixed `MemoryFS.move` and `MemoryFS.movedir` not updating the name of moved
|
||||||
resources, causing `MemoryFS.scandir` to use the old name.
|
resources, causing `MemoryFS.scandir` to use the old name.
|
||||||
- Make `WrapFS.move` and `WrapFS.movedir` use the delegate FS methods instead
|
- Make `WrapFS.move` and `WrapFS.movedir` use the delegate FS methods instead
|
||||||
of `fs.move` functions, which was causing optimized implementation of
|
of `fs.move` functions, which was causing optimized implementation of
|
||||||
`movedir` to be always skipped.
|
`movedir` to be always skipped.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
@ -162,7 +176,7 @@ Fixes:
|
|||||||
* Restored deprecated setfile method with deprecation warning
|
* Restored deprecated setfile method with deprecation warning
|
||||||
to change to writefile
|
to change to writefile
|
||||||
* Fixed exception when a tarfile contains a path called '.'
|
* Fixed exception when a tarfile contains a path called '.'
|
||||||
* Made TarFS directory loading lazy
|
* Made TarFS directory loading lazy
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-fs
|
# spec file for package python-fs
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
# Copyright (c) 2016 LISA GmbH, Bingen, Germany.
|
# Copyright (c) 2016 LISA GmbH, Bingen, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -17,29 +17,27 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%bcond_without python2
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-fs
|
Name: python-fs
|
||||||
Version: 2.4.16
|
Version: 2.4.16
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python's filesystem abstraction layer
|
Summary: Python's filesystem abstraction layer
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/PyFilesystem/pyfilesystem2
|
URL: https://github.com/PyFilesystem/pyfilesystem2
|
||||||
Source: https://files.pythonhosted.org/packages/source/f/fs/fs-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/f/fs/fs-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#PyFilesystem/pyfilesystem2#570
|
||||||
|
Patch0: support-python-312.patch
|
||||||
BuildRequires: %{python_module appdirs >= 1.4.3}
|
BuildRequires: %{python_module appdirs >= 1.4.3}
|
||||||
BuildRequires: %{python_module enum34 >= 1.1.6 if %python-base < 3.4}
|
|
||||||
BuildRequires: %{python_module parameterized}
|
BuildRequires: %{python_module parameterized}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module psutil}
|
BuildRequires: %{python_module psutil}
|
||||||
BuildRequires: %{python_module pyftpdlib}
|
BuildRequires: %{python_module pyftpdlib}
|
||||||
BuildRequires: %{python_module pysendfile}
|
BuildRequires: %{python_module pysendfile}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module pytz}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module scandir >= 1.5}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six >= 1.10.0}
|
BuildRequires: %{python_module six >= 1.10.0}
|
||||||
BuildRequires: %{python_module typing >= 3.6 if %python-base < 3.6}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-appdirs >= 1.4.3
|
Requires: python-appdirs >= 1.4.3
|
||||||
@ -49,23 +47,6 @@ Requires: python-setuptools
|
|||||||
Requires: python-six >= 1.10.0
|
Requires: python-six >= 1.10.0
|
||||||
Recommends: python-pyftpdlib
|
Recommends: python-pyftpdlib
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with python2}
|
|
||||||
BuildRequires: python-backports.os >= 0.1
|
|
||||||
BuildRequires: python-mock
|
|
||||||
%endif
|
|
||||||
%ifpython2
|
|
||||||
Requires: python-backports.os >= 0.1
|
|
||||||
%endif
|
|
||||||
%if %{python_version_nodots} < 34
|
|
||||||
Requires: python-enum34 >= 1.1.6
|
|
||||||
Recommends: python-pysendfile
|
|
||||||
%endif
|
|
||||||
%if %{python_version_nodots} < 35
|
|
||||||
Recommends: python-scandir >= 1.5
|
|
||||||
%endif
|
|
||||||
%if %{python_version_nodots} < 36
|
|
||||||
Requires: python-typing >= 3.6
|
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -76,24 +57,24 @@ write platform-independent code to work with local files, that also works with
|
|||||||
any of the supported filesystems (zip, ftp, S3 etc.).
|
any of the supported filesystems (zip, ftp, S3 etc.).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n fs-%{version}
|
%autosetup -p1 -n fs-%{version}
|
||||||
sed -i -e '/install_requires/,/bdist_wheel/ s:~=:>=:g' setup.cfg
|
sed -i -e '/install_requires/,/bdist_wheel/ s:~=:>=:g' setup.cfg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
%pytest
|
%pytest -k 'not (TestFTPFS and test_create or TestReadZipFSMem and test_seek)'
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/fs
|
%{python_sitelib}/fs
|
||||||
%{python_sitelib}/fs-%{version}*-info
|
%{python_sitelib}/fs-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
25
support-python-312.patch
Normal file
25
support-python-312.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From f6f260f97df29500a531baf1b370c3e4e4f3dc76 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||||
|
Date: Thu, 23 Mar 2023 13:23:12 +0100
|
||||||
|
Subject: [PATCH] Replace TestCase method aliases removed in Python 3.12
|
||||||
|
|
||||||
|
Fixes: #568
|
||||||
|
---
|
||||||
|
CHANGELOG.md | 2 ++
|
||||||
|
CONTRIBUTORS.md | 1 +
|
||||||
|
fs/test.py | 2 +-
|
||||||
|
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: fs-2.4.16/fs/test.py
|
||||||
|
===================================================================
|
||||||
|
--- fs-2.4.16.orig/fs/test.py
|
||||||
|
+++ fs-2.4.16/fs/test.py
|
||||||
|
@@ -1082,7 +1082,7 @@ class FSTestCases(object):
|
||||||
|
self.fs.makedirs("foo/bar/baz/")
|
||||||
|
|
||||||
|
error_msg = "resource 'foo/bar/egg/test.txt' not found"
|
||||||
|
- assertRaisesRegex = getattr(self, "assertRaisesRegex", self.assertRaisesRegexp)
|
||||||
|
+ assertRaisesRegex = getattr(self, "assertRaisesRegex", self.assertRaisesRegex)
|
||||||
|
with assertRaisesRegex(errors.ResourceNotFound, error_msg):
|
||||||
|
self.fs.remove("foo/bar/egg/test.txt")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user