forked from pool/python-Fabric
- 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
This commit is contained in:
@@ -16,7 +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
|
||||
@@ -40,10 +44,8 @@ BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest-relaxed}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: alts
|
||||
Requires: python-Deprecated
|
||||
Requires: python-decorator
|
||||
Requires: python-invoke >= 2.0
|
||||
@@ -54,6 +56,13 @@ Provides: python-Fabric3 = %{version}
|
||||
Provides: python-fabric = %{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
|
||||
@@ -90,6 +99,12 @@ sed -i 's/from invoke.vendor\./from\ /' fabric/connection.py fabric/group.py int
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative fab
|
||||
|
||||
%post
|
||||
%python_install_alternative fab
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative fab
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
|
Reference in New Issue
Block a user