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>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-fs
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2016 LISA GmbH, Bingen, Germany.
|
||||
#
|
||||
# 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}
|
||||
Name: python-fs
|
||||
Version: 2.4.16
|
||||
Release: 0
|
||||
Summary: Python's filesystem abstraction layer
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/PyFilesystem/pyfilesystem2
|
||||
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 enum34 >= 1.1.6 if %python-base < 3.4}
|
||||
BuildRequires: %{python_module parameterized}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module psutil}
|
||||
BuildRequires: %{python_module pyftpdlib}
|
||||
BuildRequires: %{python_module pysendfile}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytz}
|
||||
BuildRequires: %{python_module scandir >= 1.5}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
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: python-rpm-macros
|
||||
Requires: python-appdirs >= 1.4.3
|
||||
@ -49,23 +47,6 @@ Requires: python-setuptools
|
||||
Requires: python-six >= 1.10.0
|
||||
Recommends: python-pyftpdlib
|
||||
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
|
||||
|
||||
%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.).
|
||||
|
||||
%prep
|
||||
%setup -q -n fs-%{version}
|
||||
%autosetup -p1 -n fs-%{version}
|
||||
sed -i -e '/install_requires/,/bdist_wheel/ s:~=:>=:g' setup.cfg
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
%pytest
|
||||
%pytest -k 'not (TestFTPFS and test_create or TestReadZipFSMem and test_seek)'
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/fs
|
||||
%{python_sitelib}/fs-%{version}*-info
|
||||
%{python_sitelib}/fs-%{version}.dist-info
|
||||
|
||||
%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