Hello community,
here is the log from the commit of package python-tabulate for openSUSE:Factory
checked in at 2019-09-18 13:11:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tabulate (Old)
and /work/SRC/openSUSE:Factory/.python-tabulate.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tabulate"
Wed Sep 18 13:11:05 2019 rev:4 rq:731170 version:0.8.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tabulate/python-tabulate.changes
2019-02-14 14:31:53.591692785 +0100
+++
/work/SRC/openSUSE:Factory/.python-tabulate.new.7948/python-tabulate.changes
2019-09-18 13:11:08.136693739 +0200
@@ -1,0 +2,5 @@
+Sat Sep 14 10:10:39 UTC 2019 - John Vandenberg <[email protected]>
+
+- Add pr_2.patch to fix tests to use sys.executable
+
+-------------------------------------------------------------------
New:
----
pr_2.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-tabulate.spec ++++++
--- /var/tmp/diff_new_pack.VpamJn/_old 2019-09-18 13:11:08.728693615 +0200
+++ /var/tmp/diff_new_pack.VpamJn/_new 2019-09-18 13:11:08.736693612 +0200
@@ -25,6 +25,8 @@
Group: Development/Languages/Python
URL: https://bitbucket.org/astanin/python-tabulate
Source:
https://files.pythonhosted.org/packages/source/t/tabulate/tabulate-%{version}.tar.gz
+# https://github.com/astanin/python-tabulate/pull/2
+Patch0: pr_2.patch
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module setuptools}
@@ -51,7 +53,8 @@
decimal point
%prep
-%autosetup -n tabulate-%{version}
+%setup -n tabulate-%{version}
+%patch0 -p1
%build
%python_build
++++++ pr_2.patch ++++++
--- tabulate-0.8.3/test/test_cli.py.orig 2019-09-14 17:58:44.191319677
+0700
+++ tabulate-0.8.3/test/test_cli.py 2019-09-14 17:59:06.895533501 +0700
@@ -6,6 +6,7 @@
from __future__ import print_function
from __future__ import unicode_literals
import os
+import sys
import subprocess
@@ -97,7 +98,7 @@
def test_script_from_stdin_to_stdout():
"""Command line utility: read from stdin, print to stdout"""
- cmd = ["python", "tabulate.py"]
+ cmd = [sys.executable, "tabulate.py"]
out = run_and_capture_stdout(cmd, input=sample_input())
expected = SAMPLE_SIMPLE_FORMAT
print("got: ",repr(out))
@@ -110,7 +111,7 @@
with TemporaryTextFile() as tmpfile:
tmpfile.write(sample_input())
tmpfile.seek(0)
- cmd = ["python", "tabulate.py", tmpfile.name]
+ cmd = [sys.executable, "tabulate.py", tmpfile.name]
out = run_and_capture_stdout(cmd)
expected = SAMPLE_SIMPLE_FORMAT
print("got: ",repr(out))
@@ -124,7 +125,7 @@
with TemporaryTextFile() as output_file:
input_file.write(sample_input())
input_file.seek(0)
- cmd = ["python", "tabulate.py", "-o", output_file.name,
input_file.name]
+ cmd = [sys.executable, "tabulate.py", "-o", output_file.name,
input_file.name]
out = run_and_capture_stdout(cmd)
# check that nothing is printed to stdout
expected = ""
@@ -143,7 +144,7 @@
def test_script_header_option():
"""Command line utility: -1, --header option"""
for option in ["-1", "--header"]:
- cmd = ["python", "tabulate.py", option]
+ cmd = [sys.executable, "tabulate.py", option]
raw_table = sample_input(with_headers=True)
out = run_and_capture_stdout(cmd, input=raw_table)
expected = SAMPLE_SIMPLE_FORMAT_WITH_HEADERS
@@ -156,7 +157,7 @@
def test_script_sep_option():
"""Command line utility: -s, --sep option"""
for option in ["-s", "--sep"]:
- cmd = ["python", "tabulate.py", option, ","]
+ cmd = [sys.executable, "tabulate.py", option, ","]
raw_table = sample_input(sep=",")
out = run_and_capture_stdout(cmd, input=raw_table)
expected = SAMPLE_SIMPLE_FORMAT
@@ -168,7 +169,7 @@
def test_script_floatfmt_option():
"""Command line utility: -F, --float option"""
for option in ["-F", "--float"]:
- cmd = ["python", "tabulate.py", option, ".1e", "--format", "grid"]
+ cmd = [sys.executable, "tabulate.py", option, ".1e", "--format",
"grid"]
raw_table = sample_input()
out = run_and_capture_stdout(cmd, input=raw_table)
expected = SAMPLE_GRID_FORMAT_WITH_DOT1E_FLOATS
@@ -180,7 +181,7 @@
def test_script_format_option():
"""Command line utility: -f, --format option"""
for option in ["-f", "--format"]:
- cmd = ["python", "tabulate.py", "-1", option, "grid"]
+ cmd = [sys.executable, "tabulate.py", "-1", option, "grid"]
raw_table = sample_input(with_headers=True)
out = run_and_capture_stdout(cmd, input=raw_table)
expected = SAMPLE_GRID_FORMAT_WITH_HEADERS