14
0
forked from pool/python-invoke

Accepting request 628755 from devel:languages:python

- 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

- Update to 1.1.1:
  * Various tweaks for pytest and new py releases support
- Switch to multibuild to run tests

OBS-URL: https://build.opensuse.org/request/show/628755
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-invoke?expand=0&rev=5
This commit is contained in:
2018-08-13 07:54:33 +00:00
committed by Git OBS Bridge
5 changed files with 135 additions and 40 deletions

View File

@@ -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

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:621181a0efae67b3dadec583cf2c6b5096136635bf6a326c481c73db412b36fc
size 292418

3
invoke-1.1.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c2cf54c9b9af973ad9704d8ba81b225117cab612568cacbfb3fc42958cc20a9
size 311831

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
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
- Update to 1.1.1:
* Various tweaks for pytest and new py releases support
- Switch to multibuild to run tests
-------------------------------------------------------------------
Sat Apr 28 12:30:16 UTC 2018 - badshah400@gmail.com

View File

@@ -17,56 +17,46 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Tests have a dependency loop with python(2|3)-invocations
%bcond_with test
Name: python-invoke
Version: 0.22.1
Version: 1.1.1
Release: 0
Summary: Pythonic Task Execution
License: BSD-2-Clause
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
BuildRequires: %{python_module devel}
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 six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module invocations}
BuildRequires: %{python_module nose}
BuildRequires: python-mock
%endif
Requires: python-PyYAML
Requires: python-fluidity-sm
Requires: python-lexicon
Requires: python-pexpect
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Invoke is a Python (2.7 and 3.4+) task execution tool & library, drawing
inspiration from various sources to arrive at a powerful & clean feature set.
* Like Ruby's Rake tool and Invoke's own predecessor Fabric 1.x, it provides a
clean, high level API for running shell commands and defining/organizing
task functions from a ``tasks.py`` file
* From GNU Make, it inherits an emphasis on minimal boilerplate for common
patterns and the ability to run multiple tasks in a single invocation::
$ invoke clean build
* Following the lead of most Unix CLI applications, it offers a traditional
flag-based style of command-line parsing, deriving flag names and value types
from task signatures (optionally, of course!)::
$ invoke clean --docs --bytecode build --docs --extra='**/*.pyo'
$ invoke clean -d -b build --docs -e '**/*.pyo'
$ invoke clean -db build -de '**/*.pyo'
* Like many of its predecessors, it offers advanced features as well --
namespacing, task aliasing, before/after hooks, parallel execution and more.
%prep
%setup -q -n invoke-%{version}
# Remove bundled libs, import will fallback to system provided libs
rm -fr invoke/vendor/*
%patch0 -p1
%build
%python_build
@@ -78,12 +68,10 @@ inspiration from various sources to arrive at a powerful & clean feature set.
%python_clone -a %{buildroot}%{_bindir}/inv
%python_clone -a %{buildroot}%{_bindir}/invoke
%if %{with test}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
%{buildroot}%{_bindir}/inv-%{$python_bin_suffix} -l
py.test-%{$python_bin_suffix}
}
%endif
%post
%{python_install_alternative inv invoke}
@@ -92,8 +80,8 @@ inspiration from various sources to arrive at a powerful & clean feature set.
%python_uninstall_alternative inv
%files %{python_files}
%defattr(-,root,root)
%doc LICENSE README.rst
%license LICENSE
%doc README.rst
%python_alternative %{_bindir}/inv
%python_alternative %{_bindir}/invoke
%{python_sitelib}/invoke/