Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-template-remover for openSUSE:Factory checked in at 2024-03-13 22:19:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-template-remover (Old) and /work/SRC/openSUSE:Factory/.python-template-remover.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-template-remover" Wed Mar 13 22:19:18 2024 rev:4 rq:1157395 version:0.1.9 Changes: -------- --- /work/SRC/openSUSE:Factory/python-template-remover/python-template-remover.changes 2020-06-03 20:36:17.673882011 +0200 +++ /work/SRC/openSUSE:Factory/.python-template-remover.new.1770/python-template-remover.changes 2024-03-13 22:20:16.532024604 +0100 @@ -1,0 +2,8 @@ +Wed Mar 13 02:58:02 UTC 2024 - Steve Kowalik <steven.kowa...@suse.com> + +- Switch to autosetup and pyproject macros. +- No more greedy globs in %files. +- Add patch fix-test-assertion-methods.patch, don't use removed assertion + methods. + +------------------------------------------------------------------- New: ---- fix-test-assertion-methods.patch BETA DEBUG BEGIN: New:- No more greedy globs in %files. - Add patch fix-test-assertion-methods.patch, don't use removed assertion methods. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-template-remover.spec ++++++ --- /var/tmp/diff_new_pack.44idt1/_old 2024-03-13 22:20:17.024042742 +0100 +++ /var/tmp/diff_new_pack.44idt1/_new 2024-03-13 22:20:17.024042742 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-template-remover # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,19 +16,20 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-template-remover Version: 0.1.9 Release: 0 Summary: Remove the template markup from html files License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/deezer/template-remover Source: https://files.pythonhosted.org/packages/source/t/template-remover/template-remover-%{version}.tar.gz Source1: https://raw.githubusercontent.com/deezer/template-remover/master/LICENSE +Patch0: fix-test-assertion-methods.patch BuildRequires: %{python_module docopt >= 0.6.1} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-docopt >= 0.6.1 @@ -45,14 +46,14 @@ to be a simple way of getting rid of those markups. %prep -%setup -q -n template-remover-%{version} +%autosetup -p1 -n template-remover-%{version} cp %{SOURCE1} . %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install mv %{buildroot}%{_bindir}/remove_template.py %{buildroot}%{_bindir}/remove_template %python_clone -a %{buildroot}%{_bindir}/remove_template %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -70,5 +71,7 @@ %license LICENSE %doc README.rst %python_alternative %{_bindir}/remove_template -%{python_sitelib}/* +%{python_sitelib}/template_remover.py +%pycache_only %{python_sitelib}/__pycache__/template_remover.*.py* +%{python_sitelib}/template_remover-%{version}.dist-info ++++++ fix-test-assertion-methods.patch ++++++ Index: template-remover-0.1.9/test/test_template_remover.py =================================================================== --- template-remover-0.1.9.orig/test/test_template_remover.py +++ template-remover-0.1.9/test/test_template_remover.py @@ -37,7 +37,7 @@ class TestTemplateRemover(unittest.TestC template_remover.clean_php('<?php') def test_clean_php_inline_echo(self): - self.assertEquals( + self.assertEqual( '<a href="00000000000">Link</a>', template_remover.clean_php('<a href="<?= $foo ?>">Link</a>') ) @@ -47,46 +47,46 @@ class TestTemplateRemover(unittest.TestC template_remover.clean_php('<a href="<?= $foo \n') def test_clean_php_echo(self): - self.assertEquals( + self.assertEqual( '<a href="0000000000000000000">Link</a>', template_remover.clean_php('<a href="<?php echo $foo; ?>">Link</a>') ) def test_clean_php_short_echo(self): - self.assertEquals( + self.assertEqual( '<a href="0000000000000000">Link</a>', template_remover.clean_php('<a href="<? echo $foo; ?>">Link</a>') ) def test_clean_php_inline_echo_mixed(self): - self.assertEquals( + self.assertEqual( ' <a href="00000000000">Link</a>', template_remover.clean_php( ' <?php ?><a href="<?= $foo ?>">Link</a>') ) def test_clean_php_control(self): - self.assertEquals( + self.assertEqual( ' <a href="#next">Next</a>', template_remover.clean_php( '<?php if ($a > 1) { ?><a href="#next">Next</a><?php } ?>') ) def test_clean_php_short_tags(self): - self.assertEquals( + self.assertEqual( 'a b', template_remover.clean_php('a <? ?> b') ) def test_clean_php_control_multiline(self): - self.assertEquals( + self.assertEqual( '\n\n', template_remover.clean_php( ' <?php if ($a > 1) { \n echo "foo"\n } ?>') ) def test_clean_php_multiline(self): - self.assertEquals( + self.assertEqual( ' <a href="#next">Next</a>\n' + '<a href="00000000000">Link</a>', template_remover.clean_php( @@ -95,23 +95,23 @@ class TestTemplateRemover(unittest.TestC ) def test_spaces_are_preserved(self): - self.assertEquals( + self.assertEqual( ' \t\n ', template_remover.clean_php(' \t\n ') ) def test_php_control_at_end(self): - self.assertEquals( + self.assertEqual( ' placeholder ', template_remover.clean_php(' <?php ?> placeholder ') ) def test_unicode(self): - self.assertEquals( + self.assertEqual( 'ni\xf1o', template_remover.clean_php('ni\xf1o') ) - self.assertEquals( + self.assertEqual( '\xe9', template_remover.clean_php('\xe9') ) @@ -135,7 +135,7 @@ class TestTemplateRemover(unittest.TestC ''' - self.assertEquals(expected, template_remover.clean_php(template)) + self.assertEqual(expected, template_remover.clean_php(template)) def test_jinja_comprehensive(self): template = '''<html> @@ -156,12 +156,12 @@ class TestTemplateRemover(unittest.TestC ''' - self.assertEquals(expected, template_remover.clean_jinja(template)) + self.assertEqual(expected, template_remover.clean_jinja(template)) def test_jinja_does_not_complain_with_double_braces(self): template = '<script>var dict={foo:{}}</script>' expected = '<script>var dict={foo:{}}</script>' - self.assertEquals(expected, template_remover.clean_jinja(template)) + self.assertEqual(expected, template_remover.clean_jinja(template)) def test_mako_comprehensive(self): template = '''<html> @@ -200,4 +200,4 @@ class TestTemplateRemover(unittest.TestC ''' - self.assertEquals(expected, template_remover.clean_mako(template)) + self.assertEqual(expected, template_remover.clean_mako(template))