- Drop the multibuild as the cycle is gone
- Add patch to not rely on bundled stuff: * invocations-no-bundled.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invocations?expand=0&rev=9
This commit is contained in:
parent
a84678805d
commit
7349637ac6
@ -1,3 +0,0 @@
|
|||||||
<multibuild>
|
|
||||||
<package>test</package>
|
|
||||||
</multibuild>
|
|
93
invocations-no-bundled.patch
Normal file
93
invocations-no-bundled.patch
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
Index: invocations-1.4.0/tests/packaging/release.py
|
||||||
|
===================================================================
|
||||||
|
--- invocations-1.4.0.orig/tests/packaging/release.py
|
||||||
|
+++ invocations-1.4.0/tests/packaging/release.py
|
||||||
|
@@ -5,8 +5,12 @@ from os import path
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
-from invoke.vendor.six import PY2
|
||||||
|
-from invoke.vendor.lexicon import Lexicon
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import PY2
|
||||||
|
+ from invoke.vendor.lexicon import Lexicon
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import PY2
|
||||||
|
+ from lexicon import Lexicon
|
||||||
|
from invoke import MockContext, Result, Config
|
||||||
|
from mock import Mock, patch
|
||||||
|
from pytest import skip
|
||||||
|
Index: invocations-1.4.0/invocations/console.py
|
||||||
|
===================================================================
|
||||||
|
--- invocations-1.4.0.orig/invocations/console.py
|
||||||
|
+++ invocations-1.4.0/invocations/console.py
|
||||||
|
@@ -6,7 +6,10 @@ from __future__ import unicode_literals,
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
-from invoke.vendor.six.moves import input
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six.moves import input
|
||||||
|
+except ImportError:
|
||||||
|
+ from six.moves import input
|
||||||
|
|
||||||
|
|
||||||
|
# NOTE: originally cribbed from fab 1's contrib.console.confirm
|
||||||
|
Index: invocations-1.4.0/invocations/packaging/release.py
|
||||||
|
===================================================================
|
||||||
|
--- invocations-1.4.0.orig/invocations/packaging/release.py
|
||||||
|
+++ invocations-1.4.0/invocations/packaging/release.py
|
||||||
|
@@ -19,10 +19,14 @@ import sys
|
||||||
|
from glob import glob
|
||||||
|
from shutil import rmtree
|
||||||
|
|
||||||
|
-from invoke.vendor.six import StringIO
|
||||||
|
-
|
||||||
|
-from invoke.vendor.six import text_type, binary_type, PY2
|
||||||
|
-from invoke.vendor.lexicon import Lexicon
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import StringIO
|
||||||
|
+ from invoke.vendor.six import text_type, binary_type, PY2
|
||||||
|
+ from invoke.vendor.lexicon import Lexicon
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import StringIO
|
||||||
|
+ from six import text_type, binary_type, PY2
|
||||||
|
+ from lexicon import Lexicon
|
||||||
|
|
||||||
|
from blessings import Terminal
|
||||||
|
from enum import Enum
|
||||||
|
Index: invocations-1.4.0/invocations/packaging/semantic_version_monkey.py
|
||||||
|
===================================================================
|
||||||
|
--- invocations-1.4.0.orig/invocations/packaging/semantic_version_monkey.py
|
||||||
|
+++ invocations-1.4.0/invocations/packaging/semantic_version_monkey.py
|
||||||
|
@@ -5,7 +5,10 @@ We never like monkey-patching, but for n
|
||||||
|
or distributing our own fork.
|
||||||
|
"""
|
||||||
|
|
||||||
|
-from invoke.vendor.six import text_type
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import text_type
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import text_type
|
||||||
|
|
||||||
|
from semantic_version import Version
|
||||||
|
|
||||||
|
Index: invocations-1.4.0/invocations/testing.py
|
||||||
|
===================================================================
|
||||||
|
--- invocations-1.4.0.orig/invocations/testing.py
|
||||||
|
+++ invocations-1.4.0/invocations/testing.py
|
||||||
|
@@ -1,8 +1,12 @@
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from collections import defaultdict
|
||||||
|
-from invoke.vendor.six import iteritems
|
||||||
|
-from invoke.vendor.six.moves import range
|
||||||
|
+try:
|
||||||
|
+ from invoke.vendor.six import iteritems
|
||||||
|
+ from invoke.vendor.six.moves import range
|
||||||
|
+except ImportError:
|
||||||
|
+ from six import iteritems
|
||||||
|
+ from six.moves import range
|
||||||
|
|
||||||
|
from invoke import task
|
||||||
|
from tqdm import tqdm
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 11 12:01:52 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Drop the multibuild as the cycle is gone
|
||||||
|
- Add patch to not rely on bundled stuff:
|
||||||
|
* invocations-no-bundled.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Aug 11 10:01:08 UTC 2018 - tchvatal@suse.com
|
Sat Aug 11 10:01:08 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-invocations
|
||||||
%if "%{flavor}" == "test"
|
|
||||||
%bcond_without test
|
|
||||||
%else
|
|
||||||
%bcond_with test
|
|
||||||
%endif
|
|
||||||
Version: 1.4.0
|
Version: 1.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Reusable Invoke tasks
|
Summary: Reusable Invoke tasks
|
||||||
@ -30,36 +25,33 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://pyinvoke.org
|
URL: http://pyinvoke.org
|
||||||
Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz
|
Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz
|
||||||
BuildRequires: %{python_module setuptools}
|
Patch0: invocations-no-bundled.patch
|
||||||
BuildRequires: fdupes
|
|
||||||
BuildRequires: python-rpm-macros
|
|
||||||
Requires: python-blessings >= 1.6
|
|
||||||
Requires: python-invoke >= 1.0
|
|
||||||
Requires: python-releases >= 1.2
|
|
||||||
Requires: python-semantic_version >= 2.4
|
|
||||||
Requires: python-tabulate >= 0.7.5
|
|
||||||
Requires: python-tqdm >= 4.8.1
|
|
||||||
BuildArch: noarch
|
|
||||||
%if %{with test}
|
|
||||||
Name: python-invocations-%{flavor}
|
|
||||||
%else
|
|
||||||
Name: python-invocations
|
|
||||||
%endif
|
|
||||||
%ifpython2
|
|
||||||
Requires: python-enum34
|
|
||||||
%endif
|
|
||||||
%if %{with test}
|
|
||||||
BuildRequires: %{python_module blessings >= 1.6}
|
BuildRequires: %{python_module blessings >= 1.6}
|
||||||
BuildRequires: %{python_module invocations = %{version}}
|
|
||||||
BuildRequires: %{python_module invoke >= 1.0}
|
BuildRequires: %{python_module invoke >= 1.0}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module pytest-relaxed}
|
BuildRequires: %{python_module pytest-relaxed}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module releases >= 1.2}
|
BuildRequires: %{python_module releases >= 1.2}
|
||||||
BuildRequires: %{python_module semantic_version >= 2.4}
|
BuildRequires: %{python_module semantic_version >= 2.4}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module tabulate >= 0.7.5}
|
BuildRequires: %{python_module tabulate >= 0.7.5}
|
||||||
BuildRequires: %{python_module tqdm >= 4.8.1}
|
BuildRequires: %{python_module tqdm >= 4.8.1}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python2-enum34
|
BuildRequires: python2-enum34
|
||||||
|
Requires: python-blessings >= 1.6
|
||||||
|
Requires: python-invoke >= 1.0
|
||||||
|
Requires: python-releases >= 1.2
|
||||||
|
Requires: python-semantic_version >= 2.4
|
||||||
|
Requires: python-tabulate >= 0.7.5
|
||||||
|
Requires: python-tqdm >= 4.8.1
|
||||||
|
BuildRequires: %{python_module six}
|
||||||
|
Requires: python-six
|
||||||
|
BuildRequires: %{python_module lexicon}
|
||||||
|
Requires: python-lexicon
|
||||||
|
BuildArch: noarch
|
||||||
|
%ifpython2
|
||||||
|
Requires: python-enum34
|
||||||
%endif
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -76,28 +68,23 @@ the Invoke project's communication channels for updates. Thanks!
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n invocations-%{version}
|
%setup -q -n invocations-%{version}
|
||||||
|
%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}
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with test}
|
|
||||||
%check
|
%check
|
||||||
%{python_expand export PYTHONPATH=.
|
%{python_expand export PYTHONPATH=.
|
||||||
py.test-%{$python_bin_suffix}
|
py.test-%{$python_bin_suffix}
|
||||||
}
|
}
|
||||||
%endif
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%if !%{with test}
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user