Hello community, here is the log from the commit of package python-m2r for openSUSE:Factory checked in at 2019-12-18 14:43:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-m2r (Old) and /work/SRC/openSUSE:Factory/.python-m2r.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-m2r" Wed Dec 18 14:43:58 2019 rev:4 rq:756648 version:0.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-m2r/python-m2r.changes 2019-03-29 20:37:47.774651065 +0100 +++ /work/SRC/openSUSE:Factory/.python-m2r.new.4691/python-m2r.changes 2019-12-18 14:47:22.141912562 +0100 @@ -1,0 +2,11 @@ +Fri Dec 13 00:04:10 CET 2019 - Matej Cepl <[email protected]> + +- Instead of skipping the tests, the patch open-encoding.patch + fixes gh#miyakogi/m2r#52. + +------------------------------------------------------------------- +Tue Dec 10 21:41:04 CET 2019 - Matej Cepl <[email protected]> + +- On Leap 15 skip tests which are failing. gh#miyakogi/m2r#52 + +------------------------------------------------------------------- New: ---- open-encoding.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-m2r.spec ++++++ --- /var/tmp/diff_new_pack.q8qaK1/_old 2019-12-18 14:47:22.801912864 +0100 +++ /var/tmp/diff_new_pack.q8qaK1/_new 2019-12-18 14:47:22.813912870 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-m2r # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,13 +27,17 @@ Group: Development/Languages/Python URL: https://github.com/miyakogi/%{modname} Source: https://files.pythonhosted.org/packages/source/m/m2r/%{modname}-%{version}.tar.gz +Patch0: open-encoding.patch BuildRequires: %{python_module docutils} BuildRequires: %{python_module mistune} BuildRequires: %{python_module setuptools} %if %{with test} -BuildRequires: %{python_module mock} +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module flake8} BuildRequires: %{python_module pygments} BuildRequires: %{python_module pytest} +BuildRequires: python2-mock %endif BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -50,6 +54,8 @@ %prep %setup -q -n %{modname}-%{version} +%autopatch -p1 + sed -i '/^#!.*/d' m2r.py %build @@ -58,8 +64,9 @@ %install %python_install %python_clone -a %{buildroot}%{_bindir}/m2r -%python_expand %fdupes %{buildroot}%{$python_sitelib}/ -%python_expand rm -rf %{buildroot}%{$python_sitelib}/tests/ +%{python_expand %fdupes %{buildroot}%{$python_sitelib}/ +rm -rf %{buildroot}%{$python_sitelib}/tests/ +} %post %python_install_alternative m2r ++++++ open-encoding.patch ++++++ --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -4,6 +4,7 @@ from __future__ import print_function, unicode_literals import sys +import io import os from os import path from copy import copy @@ -37,12 +38,12 @@ class TestConvert(TestCase): options.disable_inline_math = False self._orig_argv = copy(sys.argv) if path.exists(test_rst): - with open(test_rst) as f: + with io.open(test_rst, encoding="utf8") as f: self._orig_rst = f.read() def tearDown(self): sys.argv = self._orig_argv - with open(test_rst, 'w') as f: + with io.open(test_rst, 'w', encoding="utf8") as f: f.write(self._orig_rst) def test_no_file(self): @@ -62,14 +63,14 @@ class TestConvert(TestCase): def test_parse_file(self): output = parse_from_file(test_md) - with open(test_rst) as f: + with io.open(test_rst, encoding="utf8") as f: expected = f.read() self.assertEqual(output.strip(), expected.strip()) def test_dryrun(self): sys.argv = [sys.argv[0], '--dry-run', test_md] target_file = path.join(curdir, 'test.rst') - with open(target_file) as f: + with io.open(target_file, encoding="utf8") as f: rst = f.read() os.remove(target_file) self.assertFalse(path.exists(target_file)) @@ -89,24 +90,24 @@ class TestConvert(TestCase): def test_overwrite_file(self): sys.argv = [sys.argv[0], test_md] target_file = path.join(curdir, 'test.rst') - with open(target_file, 'w') as f: + with io.open(target_file, 'w', encoding="utf8") as f: f.write('test') - with open(target_file) as f: + with io.open(target_file, encoding="utf8") as f: first_line = f.readline() self.assertIn('test', first_line) with patch(_builtin + '.input', return_value='y'): main() self.assertTrue(path.exists(target_file)) - with open(target_file) as f: + with io.open(target_file, encoding="utf8") as f: first_line = f.readline() self.assertNotIn('test', first_line) def test_overwrite_option(self): sys.argv = [sys.argv[0], '--overwrite', test_md] target_file = path.join(curdir, 'test.rst') - with open(target_file, 'w') as f: + with io.open(target_file, 'w', encoding="utf8") as f: f.write('test') - with open(target_file) as f: + with io.open(target_file, encoding="utf8") as f: first_line = f.readline() self.assertIn('test', first_line) with patch(_builtin + '.input', return_value='y') as m_input: @@ -115,7 +116,7 @@ class TestConvert(TestCase): self.assertTrue(path.exists(target_file)) self.assertFalse(m_input.called) self.assertFalse(m_print.called) - with open(target_file) as f: + with io.open(target_file, encoding="utf8") as f: first_line = f.readline() self.assertNotIn('test', first_line)
