Hello community,
here is the log from the commit of package python-proselint for
openSUSE:Factory checked in at 2019-03-10 09:39:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-proselint (Old)
and /work/SRC/openSUSE:Factory/.python-proselint.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-proselint"
Sun Mar 10 09:39:28 2019 rev:5 rq:682725 version:0.10.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-proselint/python-proselint.changes
2019-02-27 17:28:00.495345323 +0100
+++
/work/SRC/openSUSE:Factory/.python-proselint.new.28833/python-proselint.changes
2019-03-10 09:39:29.288117148 +0100
@@ -1,0 +2,6 @@
+Fri Mar 8 07:30:20 UTC 2019 - John Vandenberg <[email protected]>
+
+- Add test-use-sys-executable.patch to avoid invoking Python 3 CLI
+ during Python 2 tests.
+
+-------------------------------------------------------------------
New:
----
test-use-sys-executable.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-proselint.spec ++++++
--- /var/tmp/diff_new_pack.rpDsZb/_old 2019-03-10 09:39:29.972116984 +0100
+++ /var/tmp/diff_new_pack.rpDsZb/_new 2019-03-10 09:39:29.976116983 +0100
@@ -27,6 +27,7 @@
Source:
https://files.pythonhosted.org/packages/source/p/proselint/proselint-%{version}.tar.gz
# test_weasel_words_misc is empty in this release, and `setup.py test` doesnt
recognise nose's SkipTest
Patch0: disable-empty-test.patch
+Patch1: test-use-sys-executable.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -62,6 +63,7 @@
%prep
%setup -q -n proselint-%{version}
%patch0 -p1
+%patch1 -p1
sed -i -e '/^#!\//, 1d' proselint/*.py
%build
@@ -72,8 +74,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# One test exec's without using sys.executable
-%python_expand PATH=%{buildroot}%{_bindir}:$PATH $python setup.py test
+%python_exec setup.py test
%files %{python_files}
%doc CHANGELOG.md README.md
++++++ test-use-sys-executable.patch ++++++
>From f6950839960354cf7986f2dcd73195cdb9588dc8 Mon Sep 17 00:00:00 2001
From: John Vandenberg <[email protected]>
Date: Fri, 8 Mar 2019 14:18:47 +0700
Subject: [PATCH] test_version: Use sys.executable
---
tests/_test_version.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/_test_version.py b/tests/_test_version.py
index 7eb0d96f..2324b2ae 100644
--- a/tests/_test_version.py
+++ b/tests/_test_version.py
@@ -5,6 +5,7 @@
from .check import Check
from proselint.version import __version__
import subprocess
+import sys
class TestCheck(Check):
@@ -14,5 +15,6 @@ class TestCheck(Check):
def test_version(self):
"""Make sure the version number is correct."""
- out = subprocess.check_output(["proselint", "--version"])
+ out = subprocess.check_output(
+ [sys.executable, "-m", "proselint", "--version"])
assert out.decode('utf-8') == __version__ + "\n"