Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-smartypants for 
openSUSE:Factory checked in at 2023-03-19 16:16:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-smartypants (Old)
 and      /work/SRC/openSUSE:Factory/.python-smartypants.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-smartypants"

Sun Mar 19 16:16:30 2023 rev:6 rq:1072687 version:2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-smartypants/python-smartypants.changes    
2021-09-11 22:24:49.567404093 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-smartypants.new.31432/python-smartypants.changes
 2023-03-19 16:16:44.963371974 +0100
@@ -1,0 +2,6 @@
+Tue Mar 14 20:32:40 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- add use-sys-executable.patch to run the tests with the flavor
+  python interpreter 
+
+-------------------------------------------------------------------

New:
----
  use-sys-executable.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-smartypants.spec ++++++
--- /var/tmp/diff_new_pack.FC1fqX/_old  2023-03-19 16:16:45.383374016 +0100
+++ /var/tmp/diff_new_pack.FC1fqX/_new  2023-03-19 16:16:45.387374036 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-smartypants
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,7 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/leohemsted/smartypants.py
 Source:         
https://github.com/leohemsted/smartypants.py/archive/v%{version}.tar.gz#/smartypants-%{version}.tar.gz
+Patch1:         use-sys-executable.patch
 BuildRequires:  %{python_module docutils}
 BuildRequires:  %{python_module pygments}
 BuildRequires:  %{python_module setuptools}
@@ -43,10 +44,10 @@
 
 %prep
 %setup -q -n smartypants.py-%{version}
+%patch1 -p1
 
 %build
 %python_build
-sed -i 's:python:python3:' setup.py smartypants tests/*.py
 
 %install
 %python_install

++++++ use-sys-executable.patch ++++++
Index: smartypants.py-2.0.1/tests/test_cli.py
===================================================================
--- smartypants.py-2.0.1.orig/tests/test_cli.py
+++ smartypants.py-2.0.1/tests/test_cli.py
@@ -7,6 +7,7 @@ import os
 import tempfile
 import unittest
 from subprocess import PIPE, Popen
+import sys
 
 CLI_SCRIPT = './smartypants'
 
@@ -33,7 +34,7 @@ class TestCLI(unittest.TestCase):
         T = '"foobar"'
         E = '&#8220;foobar&#8221;'
 
-        output = self._p([CLI_SCRIPT], T)
+        output = self._p([sys.executable, CLI_SCRIPT], T)
         self.assertEquals(output, E)
 
     def test_pipe_attr(self):
@@ -41,11 +42,11 @@ class TestCLI(unittest.TestCase):
         T = """"foo" ``bar''"""
 
         E = T
-        output = self._p([CLI_SCRIPT, '--attr', '0'], T)
+        output = self._p([sys.executable, CLI_SCRIPT, '--attr', '0'], T)
         self.assertEquals(output, E)
 
         E = """"foo" &#8220;bar&#8221;"""
-        output = self._p([CLI_SCRIPT, '--attr', 'b'], T)
+        output = self._p([sys.executable, CLI_SCRIPT, '--attr', 'b'], T)
         self.assertEquals(output, E)
 
     def test_skipped_elements(self):
@@ -53,19 +54,19 @@ class TestCLI(unittest.TestCase):
         T = '<a>"foo"</a> <b>"bar"</b>'
 
         E = '<a>&#8220;foo&#8221;</a> <b>&#8220;bar&#8221;</b>'
-        output = self._p([CLI_SCRIPT], T)
+        output = self._p([sys.executable, CLI_SCRIPT], T)
         self.assertEquals(output, E)
 
         E = '<a>"foo"</a> <b>&#8220;bar&#8221;</b>'
-        output = self._p([CLI_SCRIPT, '--skip', 'a'], T)
+        output = self._p([sys.executable, CLI_SCRIPT, '--skip', 'a'], T)
         self.assertEquals(output, E)
 
         E = '<a>&#8220;foo&#8221;</a> <b>"bar"</b>'
-        output = self._p([CLI_SCRIPT, '--skip', 'b'], T)
+        output = self._p([sys.executable, CLI_SCRIPT, '--skip', 'b'], T)
         self.assertEquals(output, E)
 
         E = T
-        output = self._p([CLI_SCRIPT, '--skip', 'a,b'], T)
+        output = self._p([sys.executable, CLI_SCRIPT, '--skip', 'a,b'], T)
         self.assertEquals(output, E)
 
     def test_file(self):
@@ -78,7 +79,7 @@ class TestCLI(unittest.TestCase):
             with open(F, 'w') as f:
                 f.write(T)
 
-            output = self._p([CLI_SCRIPT, F])
+            output = self._p([sys.executable, CLI_SCRIPT, F])
         finally:
             os.remove(F)
         self.assertEquals(output, E)

Reply via email to