forked from pool/python-invoke
- Add patch to not use vendored libs:
* 0001-Make-test-fallback-to-system-modules-when-vendorized.patch - Remove unneeded deps - Remove the multibuild again as we no longer cycle OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invoke?expand=0&rev=13
This commit is contained in:
committed by
Git OBS Bridge
parent
16c2cc19bc
commit
6bf9836b43
@@ -0,0 +1,92 @@
|
|||||||
|
From 4cd025415f0ef2c1d72bf4832051971c1e7eef8b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Athmane Madjoudj <athmane@fedoraproject.org>
|
||||||
|
Date: Fri, 11 May 2018 19:47:18 +0100
|
||||||
|
Subject: [PATCH] Make test fallback to system modules when vendorized one are
|
||||||
|
not available
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/_util.py | 5 ++++-
|
||||||
|
tests/concurrency.py | 5 ++++-
|
||||||
|
tests/conftest.py | 6 +++++-
|
||||||
|
tests/executor.py | 5 ++++-
|
||||||
|
tests/runners.py | 5 ++++-
|
||||||
|
tests/watchers.py | 5 ++++-
|
||||||
|
6 files changed, 25 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
Index: invoke-1.1.1/tests/_util.py
|
||||||
|
===================================================================
|
||||||
|
--- invoke-1.1.1.orig/tests/_util.py
|
||||||
|
+++ invoke-1.1.1/tests/_util.py
|
||||||
|
@@ -8,7 +8,10 @@ except ImportError:
|
||||||
|
termios = None
|
||||||
|
from contextlib import contextmanager
|
||||||
|
|
||||||
|
-from invoke.vendor.six import BytesIO, b, wraps
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import BytesIO, b, wraps
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import BytesIO, b, wraps
|
||||||
|
|
||||||
|
from mock import patch, Mock
|
||||||
|
from pytest import skip
|
||||||
|
Index: invoke-1.1.1/tests/concurrency.py
|
||||||
|
===================================================================
|
||||||
|
--- invoke-1.1.1.orig/tests/concurrency.py
|
||||||
|
+++ invoke-1.1.1/tests/concurrency.py
|
||||||
|
@@ -1,4 +1,7 @@
|
||||||
|
-from invoke.vendor.six.moves.queue import Queue
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six.moves.queue import Queue
|
||||||
|
+except ImportError:
|
||||||
|
+ from six.moves.queue import Queue
|
||||||
|
|
||||||
|
from invoke.util import ExceptionWrapper, ExceptionHandlingThread as EHThread
|
||||||
|
|
||||||
|
Index: invoke-1.1.1/tests/conftest.py
|
||||||
|
===================================================================
|
||||||
|
--- invoke-1.1.1.orig/tests/conftest.py
|
||||||
|
+++ invoke-1.1.1/tests/conftest.py
|
||||||
|
@@ -3,7 +3,11 @@ import os
|
||||||
|
import sys
|
||||||
|
import termios
|
||||||
|
|
||||||
|
-from invoke.vendor.six import iteritems
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import iteritems
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import iteritems
|
||||||
|
+
|
||||||
|
import pytest
|
||||||
|
from mock import patch
|
||||||
|
|
||||||
|
Index: invoke-1.1.1/tests/runners.py
|
||||||
|
===================================================================
|
||||||
|
--- invoke-1.1.1.orig/tests/runners.py
|
||||||
|
+++ invoke-1.1.1/tests/runners.py
|
||||||
|
@@ -6,7 +6,10 @@ import types
|
||||||
|
from io import BytesIO
|
||||||
|
from itertools import chain, repeat
|
||||||
|
|
||||||
|
-from invoke.vendor.six import StringIO, b, PY2, iteritems
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import StringIO, b, PY2, iteritems
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import StringIO, b, PY2, iteritems
|
||||||
|
|
||||||
|
from pytest import raises, skip
|
||||||
|
from pytest_relaxed import trap
|
||||||
|
Index: invoke-1.1.1/tests/watchers.py
|
||||||
|
===================================================================
|
||||||
|
--- invoke-1.1.1.orig/tests/watchers.py
|
||||||
|
+++ invoke-1.1.1/tests/watchers.py
|
||||||
|
@@ -1,6 +1,9 @@
|
||||||
|
from threading import Thread, Event
|
||||||
|
|
||||||
|
-from invoke.vendor.six.moves.queue import Queue, Empty
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six.moves.queue import Queue, Empty
|
||||||
|
+except:
|
||||||
|
+ from six.moves.queue import Queue, Empty
|
||||||
|
|
||||||
|
from invoke import Responder, FailingResponder, ResponseNotAccepted
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
<multibuild>
|
|
||||||
<package>test</package>
|
|
||||||
</multibuild>
|
|
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 11 11:42:30 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Add patch to not use vendored libs:
|
||||||
|
* 0001-Make-test-fallback-to-system-modules-when-vendorized.patch
|
||||||
|
- Remove unneeded deps
|
||||||
|
- Remove the multibuild again as we no longer cycle
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Aug 11 10:04:46 UTC 2018 - tchvatal@suse.com
|
Sat Aug 11 10:04:46 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@@ -17,12 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
Name: python-invoke
|
||||||
%if "%{flavor}" == "test"
|
|
||||||
%bcond_without test
|
|
||||||
%else
|
|
||||||
%bcond_with test
|
|
||||||
%endif
|
|
||||||
Version: 1.1.1
|
Version: 1.1.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Pythonic Task Execution
|
Summary: Pythonic Task Execution
|
||||||
@@ -30,24 +25,26 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://www.pyinvoke.org
|
URL: http://www.pyinvoke.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/i/invoke/invoke-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/i/invoke/invoke-%{version}.tar.gz
|
||||||
|
Patch0: 0001-Make-test-fallback-to-system-modules-when-vendorized.patch
|
||||||
|
BuildRequires: %{python_module PyYAML}
|
||||||
|
BuildRequires: %{python_module fluidity-sm}
|
||||||
|
BuildRequires: %{python_module lexicon}
|
||||||
|
BuildRequires: %{python_module mock}
|
||||||
|
BuildRequires: %{python_module pexpect}
|
||||||
|
BuildRequires: %{python_module pytest-relaxed}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-PyYAML
|
||||||
|
Requires: python-fluidity-sm
|
||||||
|
Requires: python-lexicon
|
||||||
|
Requires: python-pexpect
|
||||||
|
Requires: python-six
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
|
||||||
BuildRequires: %{python_module invocations >= 1.4}
|
|
||||||
BuildRequires: %{python_module invoke = %{version}}
|
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module pytest-relaxed}
|
|
||||||
BuildRequires: %{python_module pytest}
|
|
||||||
%endif
|
|
||||||
%if %{with test}
|
|
||||||
Name: python-invoke-%{flavor}
|
|
||||||
%else
|
|
||||||
Name: python-invoke
|
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -56,43 +53,38 @@ inspiration from various sources to arrive at a powerful & clean feature set.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n invoke-%{version}
|
%setup -q -n invoke-%{version}
|
||||||
|
# Remove bundled libs, import will fallback to system provided libs
|
||||||
|
rm -fr invoke/vendor/*
|
||||||
|
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if !%{with test}
|
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/inv
|
%python_clone -a %{buildroot}%{_bindir}/inv
|
||||||
%python_clone -a %{buildroot}%{_bindir}/invoke
|
%python_clone -a %{buildroot}%{_bindir}/invoke
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with test}
|
|
||||||
%check
|
%check
|
||||||
%{python_expand export PYTHONPATH=%{$python_sitelib}
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
py.test-%{$python_bin_suffix}
|
py.test-%{$python_bin_suffix}
|
||||||
%{_bindir}/inv-%{$python_bin_suffix} -l
|
|
||||||
}
|
}
|
||||||
%endif
|
|
||||||
|
|
||||||
%if !%{with test}
|
|
||||||
%post
|
%post
|
||||||
%{python_install_alternative inv invoke}
|
%{python_install_alternative inv invoke}
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative inv
|
%python_uninstall_alternative inv
|
||||||
%endif
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%if !%{with test}
|
|
||||||
%python_alternative %{_bindir}/inv
|
%python_alternative %{_bindir}/inv
|
||||||
%python_alternative %{_bindir}/invoke
|
%python_alternative %{_bindir}/invoke
|
||||||
%{python_sitelib}/invoke/
|
%{python_sitelib}/invoke/
|
||||||
%{python_sitelib}/invoke-%{version}-py*
|
%{python_sitelib}/invoke-%{version}-py*
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user