diff --git a/fix_entry_point.patch b/fix_entry_point.patch new file mode 100644 index 0000000..1ac3df8 --- /dev/null +++ b/fix_entry_point.patch @@ -0,0 +1,19 @@ +--- a/screenplain/main.py ++++ b/screenplain/main.py +@@ -30,7 +30,7 @@ def invalid_format(parser, message): + ) + + +-def main(args): ++def main(args=sys.argv[1:]): + parser = OptionParser(usage=usage) + parser.add_option( + '-f', '--format', dest='output_format', +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,2 +1,5 @@ + [metadata] + license_files = LICENSE.txt ++ ++[pycodestyle] ++ignore = E402,W504 diff --git a/python-screenplain.changes b/python-screenplain.changes index 7245e00..5449b04 100644 --- a/python-screenplain.changes +++ b/python-screenplain.changes @@ -4,6 +4,8 @@ Thu Dec 03 21:34:14 UTC 2020 - mcepl@cepl.eu - Update to version 0.9.0+git.1597423678.4e34d1f: * Don't use open, but more compatible io.open - Remove py2.patch, which has been included upstream. +- Add fix_entry_point.patch +- We don't need any stinking pytest. ------------------------------------------------------------------- Fri Aug 14 16:29:32 UTC 2020 - mcepl@cepl.eu diff --git a/python-screenplain.spec b/python-screenplain.spec index 843b625..287e8ac 100644 --- a/python-screenplain.spec +++ b/python-screenplain.spec @@ -32,8 +32,10 @@ URL: http://www.screenplain.com/ # Source: https://files.pythonhosted.org/packages/source/s/screenplain/screenplain-%%{version}.tar.gz # Tarball generated from gh#vilcans/screenplain#62 Source: screenplain-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix_entry_point.patch mcepl@suse.com +# entry point lead to incorrect function. +Patch0: fix_entry_point.patch BuildRequires: %{python_module pycodestyle} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module reportlab} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -76,9 +78,9 @@ sed -i '1{/^#!.*env python/d}' screenplain/main.py %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -export PYTEST_ADDOPTS="--doctest-modules" -%pytest -python3 -mpycodestyle -v --ignore=E402,W504 screenplain tests +%pyunittest discover -v -p '*test*.py' +%python_exec -mdoctest -v screenplain/*.py +%python_exec -mpycodestyle -v screenplain tests %post %python_install_alternative screenplain