Hello community, here is the log from the commit of package python-pexpect for openSUSE:Factory checked in at 2020-03-27 00:21:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pexpect (Old) and /work/SRC/openSUSE:Factory/.python-pexpect.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pexpect" Fri Mar 27 00:21:55 2020 rev:33 rq:784290 version:4.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pexpect/python-pexpect.changes 2020-02-19 12:40:09.507580493 +0100 +++ /work/SRC/openSUSE:Factory/.python-pexpect.new.3160/python-pexpect.changes 2020-03-27 00:22:01.180157183 +0100 @@ -1,0 +2,6 @@ +Thu Mar 12 11:32:53 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Add patch to build without python2: + * no-python-binary.patch + +------------------------------------------------------------------- New: ---- no-python-binary.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pexpect.spec ++++++ --- /var/tmp/diff_new_pack.WalxjT/_old 2020-03-27 00:22:02.260157731 +0100 +++ /var/tmp/diff_new_pack.WalxjT/_new 2020-03-27 00:22:02.264157733 +0100 @@ -22,9 +22,9 @@ Release: 0 Summary: Pure Python Expect-like module License: ISC -Group: Development/Libraries/Python -URL: http://pexpect.readthedocs.org/en/latest/ +URL: https://pexpect.readthedocs.org/en/latest/ Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz +Patch0: no-python-binary.patch BuildRequires: %{python_module ptyprocess} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -46,6 +46,7 @@ %prep %setup -q -n pexpect-%{version} +%patch0 -p1 # Fix wrong-script-interpreter find examples -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} \; ++++++ no-python-binary.patch ++++++ Index: pexpect-4.8.0/tests/test_performance.py =================================================================== --- pexpect-4.8.0.orig/tests/test_performance.py +++ pexpect-4.8.0/tests/test_performance.py @@ -45,7 +45,7 @@ class PerformanceTestCase (PexpectTestCa return 'for n in range(1, %d+1): print(n)' % n def plain_range(self, n): - e = pexpect.spawn('python', timeout=100) + e = pexpect.spawn(sys.executable, timeout=100) self.assertEqual(e.expect(b'>>>'), 0) e.sendline(self._iter_n(n)) self.assertEqual(e.expect(br'\.{3}'), 0) @@ -53,7 +53,7 @@ class PerformanceTestCase (PexpectTestCa self.assertEqual(e.expect([b'inquisition', '%d' % n]), 1) def window_range(self, n): - e = pexpect.spawn('python', timeout=100) + e = pexpect.spawn(sys.executable, timeout=100) self.assertEqual(e.expect(b'>>>'), 0) e.sendline(self._iter_n(n)) self.assertEqual(e.expect(r'\.{3}'), 0) @@ -61,7 +61,7 @@ class PerformanceTestCase (PexpectTestCa self.assertEqual(e.expect([b'inquisition', '%d' % n], searchwindowsize=20), 1) def exact_range(self, n): - e = pexpect.spawn('python', timeout=100) + e = pexpect.spawn(sys.executable, timeout=100) self.assertEqual(e.expect_exact([b'>>>']), 0) e.sendline(self._iter_n(n)) self.assertEqual(e.expect_exact([b'...']), 0) @@ -69,7 +69,7 @@ class PerformanceTestCase (PexpectTestCa self.assertEqual(e.expect_exact([b'inquisition', '%d' % n],timeout=520), 1) def ewin_range(self, n): - e = pexpect.spawn('python', timeout=100) + e = pexpect.spawn(sys.executable, timeout=100) self.assertEqual(e.expect_exact([b'>>>']), 0) e.sendline(self._iter_n(n)) self.assertEqual(e.expect_exact([b'...']), 0) @@ -77,7 +77,7 @@ class PerformanceTestCase (PexpectTestCa self.assertEqual(e.expect_exact([b'inquisition', '%d' % n], searchwindowsize=20), 1) def faster_range(self, n): - e = pexpect.spawn('python', timeout=100) + e = pexpect.spawn(sys.executable, timeout=100) self.assertEqual(e.expect(b'>>>'), 0) e.sendline(('list(range(1, %d+1))' % n).encode('ascii')) self.assertEqual(e.expect([b'inquisition', '%d' % n]), 1) Index: pexpect-4.8.0/tests/test_replwrap.py =================================================================== --- pexpect-4.8.0.orig/tests/test_replwrap.py +++ pexpect-4.8.0/tests/test_replwrap.py @@ -2,6 +2,7 @@ import platform import unittest import re import os +import sys import pexpect from pexpect import replwrap @@ -108,7 +109,7 @@ class REPLWrapTestCase(unittest.TestCase if platform.python_implementation() == 'PyPy': raise unittest.SkipTest(skip_pypy) - child = pexpect.spawn('python', echo=False, timeout=5, encoding='utf-8') + child = pexpect.spawn(sys.executable, echo=False, timeout=5, encoding='utf-8') # prompt_change=None should mean no prompt change py = replwrap.REPLWrapper(child, u">>> ", prompt_change=None, continuation_prompt=u"... ") Index: pexpect-4.8.0/tests/test_run.py =================================================================== --- pexpect-4.8.0.orig/tests/test_run.py +++ pexpect-4.8.0/tests/test_run.py @@ -69,7 +69,7 @@ class RunFuncTestCase(PexpectTestCase.Pe super(RunFuncTestCase, self).tearDown() def test_run_exit(self): - (data, exitstatus) = self.runfunc('python exit1.py', withexitstatus=1) + (data, exitstatus) = self.runfunc(sys.executable + ' exit1.py', withexitstatus=1) assert exitstatus == 1, "Exit status of 'python exit1.py' should be 1." def test_run(self): Index: pexpect-4.8.0/pexpect/replwrap.py =================================================================== --- pexpect-4.8.0.orig/pexpect/replwrap.py +++ pexpect-4.8.0/pexpect/replwrap.py @@ -108,7 +108,7 @@ class REPLWrapper(object): + command) return u''.join(res + [self.child.before]) -def python(command="python"): +def python(command=sys.executable): """Start a Python shell and return a :class:`REPLWrapper` object.""" return REPLWrapper(command, u">>> ", u"import sys; sys.ps1={0!r}; sys.ps2={1!r}")