14
0
forked from pool/python-Fabric

7 Commits

Author SHA256 Message Date
5ceabc279f Accepting request 1300021 from devel:languages:python
- Convert to libalternatives on SLE-16-based and newer systems only

OBS-URL: https://build.opensuse.org/request/show/1300021
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Fabric?expand=0&rev=47
2025-08-18 14:08:50 +00:00
4e90be7b80 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Fabric?expand=0&rev=93 2025-08-18 08:18:49 +00:00
653e9ce271 - Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Fabric?expand=0&rev=92
2025-08-14 13:43:29 +00:00
3b6eb23ea2 Accepting request 1291279 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1291279
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Fabric?expand=0&rev=46
2025-07-09 15:26:13 +00:00
0d7954af2c - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Fabric?expand=0&rev=90
2025-07-08 13:17:29 +00:00
30de5db7de Accepting request 1195241 from devel:languages:python
- Add patch support-pytest-8.patch:
  * Use setup_method(), not setup().
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/request/show/1195241
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Fabric?expand=0&rev=45
2024-08-22 16:13:53 +00:00
d5e12005d4 - Add patch support-pytest-8.patch:
* Use setup_method(), not setup().
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Fabric?expand=0&rev=88
2024-08-22 06:26:40 +00:00
3 changed files with 184 additions and 9 deletions

View File

@@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Aug 14 13:29:28 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
-------------------------------------------------------------------
Tue Jul 8 13:16:23 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Thu Aug 22 06:25:46 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pytest-8.patch:
* Use setup_method(), not setup().
- Switch to pyproject macros.
-------------------------------------------------------------------
Thu Oct 19 08:51:37 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-Fabric
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,11 @@
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-Fabric
Version: 3.2.2
@@ -28,29 +33,36 @@ Source: https://files.pythonhosted.org/packages/source/f/fabric/fabric-%
Patch0: fix-executable.patch
# PATCH-FIX-OPENSUSE fix-test-deps.patch - remove usage of icecream and vendored libs
Patch1: fix-test-deps.patch
# PATCH-FIX-UPSTREAM gh#fabric/fabric#2249
Patch2: support-pytest-8.patch
BuildRequires: %{python_module Deprecated}
BuildRequires: %{python_module decorator}
BuildRequires: %{python_module invoke >= 2.0}
BuildRequires: %{python_module lexicon}
BuildRequires: %{python_module paramiko >= 3.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-relaxed}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Deprecated
Requires: python-decorator
Requires: python-invoke >= 2.0
Requires: python-paramiko >= 3.2
Requires(post): update-alternatives
Requires(postun):update-alternatives
Conflicts: python-Fabric3
Provides: python-Fabric2 = %{version}
Provides: python-Fabric3 = %{version}
Provides: python-Fabric3 = %{version}
Provides: python-fabric = %{version}
Provides: python-fabric2 = %{version}
Provides: python-fabric2 = %{version}
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages
%description
@@ -74,15 +86,19 @@ Fabric itself leverages).
sed -i 's/from invoke.vendor\./from\ /' fabric/connection.py fabric/group.py integration/concurrency.py tests/config.py tests/transfer.py tests/_util.py tests/connection.py tests/runners.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/fab
%check
%pytest tests/
# fake, fake_agent, no_stdin - pytest-relaxed collects fixtures for some reason
%pytest tests/ -k "not (fake or no_stdin)"
%pre
%python_libalternatives_reset_alternative fab
%post
%python_install_alternative fab
@@ -95,6 +111,6 @@ sed -i 's/from invoke.vendor\./from\ /' fabric/connection.py fabric/group.py int
%doc README.rst
%python_alternative %{_bindir}/fab
%{python_sitelib}/fabric
%{python_sitelib}/fabric-%{version}*-info
%{python_sitelib}/fabric-%{version}.dist-info
%changelog

142
support-pytest-8.patch Normal file
View File

@@ -0,0 +1,142 @@
From 0bb53464b407dde93beaca6c985d4fa86e9b3989 Mon Sep 17 00:00:00 2001
From: "Jesse P. Johnson" <jpj6652@gmail.com>
Date: Sat, 25 Feb 2023 15:02:01 -0500
Subject: [PATCH] test: resolve nose deprecation warnings with pytest
---
integration/concurrency.py | 2 +-
integration/connection.py | 4 ++--
integration/transfer.py | 4 ++--
tests/config.py | 2 +-
tests/connection.py | 6 +++---
tests/group.py | 2 +-
tests/transfer.py | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/integration/concurrency.py b/integration/concurrency.py
index c6b2d56b56..82f905000f 100644
--- a/integration/concurrency.py
+++ b/integration/concurrency.py
@@ -26,7 +26,7 @@ class concurrency:
# TODO: spin up multiple temp SSHDs / Paramiko servers / ???
- def setup(self):
+ def setup_method(self):
cxn1 = Connection("localhost")
cxn2 = Connection("localhost")
cxn3 = Connection("localhost")
diff --git a/integration/connection.py b/integration/connection.py
index 1fa15a8c4b..3f72741b6a 100644
--- a/integration/connection.py
+++ b/integration/connection.py
@@ -96,7 +96,7 @@ def mixed_use_of_local_and_run(self):
assert result.stdout == "foo\n"
class sudo:
- def setup(self):
+ def setup_method(self):
# NOTE: assumes a user configured for passworded (NOT
# passwordless)_sudo, whose password is 'mypass', is executing the
# test suite. I.e. our travis-ci setup.
@@ -137,7 +137,7 @@ def large_remote_commands_finish_cleanly(self):
assert len(lines) == len(words)
class command_timeout:
- def setup(self):
+ def setup_method(self):
self.cxn = Connection("localhost")
def does_not_raise_exception_when_under_timeout(self):
diff --git a/integration/transfer.py b/integration/transfer.py
index f55db14c0c..f918254814 100644
--- a/integration/transfer.py
+++ b/integration/transfer.py
@@ -13,7 +13,7 @@ def _support(*parts):
class Transfer_:
class get:
- def setup(self):
+ def setup_method(self):
self.c = Connection("localhost")
self.remote = _support("file.txt")
@@ -50,7 +50,7 @@ def mode_preservation(self, tmpdir):
assert stat.S_IMODE(local.stat().mode) == 0o641
class put:
- def setup(self):
+ def setup_method(self):
self.c = Connection("localhost")
self.remote = path.local.mkdtemp().join("file.txt").realpath()
diff --git a/tests/config.py b/tests/config.py
index 1357def268..9d1c52e5f5 100644
--- a/tests/config.py
+++ b/tests/config.py
@@ -65,7 +65,7 @@ def uses_Fabric_prefix(self):
assert Config().prefix == "fabric"
class from_v1:
- def setup(self):
+ def setup_method(self):
self.env = faux_v1_env()
def _conf(self, **kwargs):
diff --git a/tests/connection.py b/tests/connection.py
index 168c2b2def..a6495d93c4 100644
--- a/tests/connection.py
+++ b/tests/connection.py
@@ -380,7 +380,7 @@ def explicit_False_turns_off_feature(self):
assert cxn.gateway is False
class proxy_jump:
- def setup(self):
+ def setup_method(self):
self._expected_gw = Connection("jumpuser@jumphost:373")
def wins_over_default(self):
@@ -515,7 +515,7 @@ def may_be_given(self):
assert cxn.inline_ssh_env is False
class from_v1:
- def setup(self):
+ def setup_method(self):
self.env = faux_v1_env()
def _cxn(self, **kwargs):
@@ -1054,7 +1054,7 @@ def calls_Remote_run_with_command_and_kwargs_and_returns_its_result(
assert r is remote.run.return_value
class shell:
- def setup(self):
+ def setup_method(self):
self.defaults = Config.global_defaults()["run"]
@patch(remote_shell_path)
diff --git a/tests/group.py b/tests/group.py
index c928a33357..56fe4159cb 100644
--- a/tests/group.py
+++ b/tests/group.py
@@ -180,7 +180,7 @@ def returns_results_mapping(self, method):
class ThreadingGroup_:
- def setup(self):
+ def setup_method(self):
self.cxns = [Connection(x) for x in ("host1", "host2", "host3")]
@mark.parametrize("method", ALL_METHODS)
diff --git a/tests/transfer.py b/tests/transfer.py
index 5233cf6768..f6398a5dfb 100644
--- a/tests/transfer.py
+++ b/tests/transfer.py
@@ -129,7 +129,7 @@ def result_contains_fd_for_local_path(self, sftp_objs):
assert result.local is fd
class mode_concerns:
- def setup(self):
+ def setup_method(self):
self.attrs = SFTPAttributes()
self.attrs.st_mode = 0o100644