forked from pool/python-sh
Accepting request 854162 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/854162 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sh?expand=0&rev=9
This commit is contained in:
commit
d66952d092
@ -1,13 +0,0 @@
|
|||||||
Index: sh-1.13.1/test.py
|
|
||||||
===================================================================
|
|
||||||
--- sh-1.13.1.orig/test.py
|
|
||||||
+++ sh-1.13.1/test.py
|
|
||||||
@@ -1974,7 +1974,7 @@ sys.stdout.write("line1")
|
|
||||||
try:
|
|
||||||
sh.sleep(sleep_for, _timeout=timeout).wait()
|
|
||||||
except sh.TimeoutException as e:
|
|
||||||
- self.assertEqual(e.full_cmd, '/bin/sleep 3')
|
|
||||||
+ self.assertEqual(e.full_cmd, '/usr/bin/sleep 3')
|
|
||||||
else:
|
|
||||||
self.fail("no timeout exception")
|
|
||||||
elapsed = time() - started
|
|
@ -1,25 +0,0 @@
|
|||||||
Index: sh-1.13.1/test.py
|
|
||||||
===================================================================
|
|
||||||
--- sh-1.13.1.orig/test.py
|
|
||||||
+++ sh-1.13.1/test.py
|
|
||||||
@@ -1449,10 +1449,9 @@ for i in range(5):
|
|
||||||
self.assertTrue("4" not in stdout)
|
|
||||||
|
|
||||||
def test_general_signal(self):
|
|
||||||
- import signal
|
|
||||||
from signal import SIGINT
|
|
||||||
|
|
||||||
- py = create_tmp_test("""
|
|
||||||
+ py = create_tmp_test(r"""
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
@@ -1478,7 +1477,7 @@ for i in range(5):
|
|
||||||
process.signal(SIGINT)
|
|
||||||
return True
|
|
||||||
|
|
||||||
- p = python(py.name, _out=agg, _tee=True)
|
|
||||||
+ p = python('-u', py.name, _out=agg, _tee=True)
|
|
||||||
p.wait()
|
|
||||||
|
|
||||||
self.assertEqual(p.process.exit_code, 0)
|
|
@ -1,20 +0,0 @@
|
|||||||
Index: sh-1.13.1/test.py
|
|
||||||
===================================================================
|
|
||||||
--- sh-1.13.1.orig/test.py
|
|
||||||
+++ sh-1.13.1/test.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-# -*- coding: utf8 -*-
|
|
||||||
+# -*- coding: utf-8 -*-
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
@@ -2174,7 +2174,8 @@ time.sleep(3)
|
|
||||||
""")
|
|
||||||
|
|
||||||
parent = create_tmp_test("""
|
|
||||||
-import sys
|
|
||||||
+import os, sys
|
|
||||||
+sys.path.insert(0, os.getcwd())
|
|
||||||
import sh
|
|
||||||
python = sh.Command(sys.executable)
|
|
||||||
p = python("{child_file}", _bg=True, _new_session=False)
|
|
@ -1,66 +0,0 @@
|
|||||||
Index: sh-1.13.1/sh.py
|
|
||||||
===================================================================
|
|
||||||
--- sh-1.13.1.orig/sh.py
|
|
||||||
+++ sh-1.13.1/sh.py
|
|
||||||
@@ -3785,14 +3785,9 @@ if __name__ == "__main__": # pragma: no
|
|
||||||
|
|
||||||
if action in ("test", "travis", "tox"):
|
|
||||||
import test
|
|
||||||
- coverage = None
|
|
||||||
- if test.HAS_UNICODE_LITERAL:
|
|
||||||
- import coverage
|
|
||||||
|
|
||||||
env = os.environ.copy()
|
|
||||||
env["SH_TESTS_RUNNING"] = "1"
|
|
||||||
- if coverage:
|
|
||||||
- test.append_module_path(env, coverage)
|
|
||||||
|
|
||||||
# if we're testing locally, run all versions of python on the system
|
|
||||||
if action == "test":
|
|
||||||
Index: sh-1.13.1/test.py
|
|
||||||
===================================================================
|
|
||||||
--- sh-1.13.1.orig/test.py
|
|
||||||
+++ sh-1.13.1/test.py
|
|
||||||
@@ -6,34 +6,6 @@ IS_PY3 = sys.version_info[0] == 3
|
|
||||||
IS_PY2 = not IS_PY3
|
|
||||||
MINOR_VER = sys.version_info[1]
|
|
||||||
|
|
||||||
-# coverage doesn't work in python 3.1, 3.2 due to it just being a shit
|
|
||||||
-# python
|
|
||||||
-HAS_UNICODE_LITERAL = not (IS_PY3 and MINOR_VER in (1, 2))
|
|
||||||
-
|
|
||||||
-cov = None
|
|
||||||
-if HAS_UNICODE_LITERAL:
|
|
||||||
- run_idx = int(os.environ.pop("SH_TEST_RUN_IDX", "0"))
|
|
||||||
- first_run = run_idx == 0
|
|
||||||
-
|
|
||||||
- try:
|
|
||||||
- import coverage
|
|
||||||
- except ImportError:
|
|
||||||
- pass
|
|
||||||
- else:
|
|
||||||
- # for some reason, we can't run auto_data on the first run, or the coverage
|
|
||||||
- # numbers get really screwed up
|
|
||||||
- auto_data = True
|
|
||||||
- if first_run:
|
|
||||||
- auto_data = False
|
|
||||||
-
|
|
||||||
- cov = coverage.Coverage(auto_data=auto_data)
|
|
||||||
-
|
|
||||||
- if first_run:
|
|
||||||
- cov.erase()
|
|
||||||
-
|
|
||||||
- cov.start()
|
|
||||||
-
|
|
||||||
-
|
|
||||||
from os.path import exists, join, realpath, dirname, split
|
|
||||||
import unittest
|
|
||||||
try:
|
|
||||||
@@ -3230,6 +3202,4 @@ if __name__ == "__main__":
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
finally:
|
|
||||||
- if cov:
|
|
||||||
- cov.stop()
|
|
||||||
- cov.save()
|
|
||||||
+ pass
|
|
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 8 21:25:24 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to 1.14.1:
|
||||||
|
* bugfix where setting _ok_code to not include 0, but 0 was the
|
||||||
|
exit code #545
|
||||||
|
- Changes for 1.14.0
|
||||||
|
* _env now more lenient in accepting dictionary-like objects #527
|
||||||
|
* None and False arguments now do not pass through to underlying
|
||||||
|
command #525
|
||||||
|
* Implemented find_spec on the fancy importer, which fixes some
|
||||||
|
Python3.4+ issues #536
|
||||||
|
- Drop all patches: they are no longer applicable
|
||||||
|
* fix-sleep-path-in-test.patch
|
||||||
|
* fix-test_general_signal.diff
|
||||||
|
* fix-test_signal_group.diff
|
||||||
|
* no-coverage.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 17 08:14:24 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
Wed Jun 17 08:14:24 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@ -18,16 +18,12 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-sh
|
Name: python-sh
|
||||||
Version: 1.13.1
|
Version: 1.14.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python subprocess interface
|
Summary: Python subprocess interface
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/amoffat/sh
|
URL: https://github.com/amoffat/sh
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/sh/sh-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/s/sh/sh-%{version}.tar.gz
|
||||||
Patch0: no-coverage.patch
|
|
||||||
Patch1: fix-test_signal_group.diff
|
|
||||||
Patch2: fix-test_general_signal.diff
|
|
||||||
Patch3: fix-sleep-path-in-test.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -45,7 +41,6 @@ sh is not a collection of system commands implemented in Python.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n sh-%{version}
|
%setup -q -n sh-%{version}
|
||||||
%autopatch -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:97a3d2205e3c6a842d87ebbc9ae93acae5a352b1bc4609b428d0fd5bb9e286a3
|
|
||||||
size 62768
|
|
3
sh-1.14.1.tar.gz
Normal file
3
sh-1.14.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:39aa9af22f6558a0c5d132881cf43e34828ca03e4ae11114852ca6a55c7c1d8e
|
||||||
|
size 63317
|
Loading…
x
Reference in New Issue
Block a user