From afbc600c25bf9ae37ffb93cd6fa324fd07a2bae126c3f9b9415298ca1e662940 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 3 Dec 2020 21:34:53 +0000 Subject: [PATCH 1/4] - Update to version 0.9.0+git.1597423678.4e34d1f: * Don't use open, but more compatible io.open OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screenplain?expand=0&rev=3 --- _servicedata | 2 +- python-screenplain.changes | 6 ++++++ python-screenplain.spec | 20 +++++++++++--------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/_servicedata b/_servicedata index cb807a4..2f8233e 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/mcepl/screenplain.git - 0ff963d98eba7faf573ac425d03d8371e88c7e66 \ No newline at end of file + 4e34d1f78f6006d40933d744e61ae968f349f95d \ No newline at end of file diff --git a/python-screenplain.changes b/python-screenplain.changes index 2dca72f..98b1890 100644 --- a/python-screenplain.changes +++ b/python-screenplain.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 + ------------------------------------------------------------------- Fri Aug 14 16:29:32 UTC 2020 - mcepl@cepl.eu diff --git a/python-screenplain.spec b/python-screenplain.spec index 3fff0c4..7dabac0 100644 --- a/python-screenplain.spec +++ b/python-screenplain.spec @@ -1,7 +1,7 @@ # # spec file for package python-screenplain # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,9 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + %if 0%{?suse_version} > 1500 %bcond_with python2 @@ -21,24 +23,24 @@ %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-screenplain -Version: 0.9.0+git.1597420829.0ff963d +Version: 0.9.0+git.1597423678.4e34d1f Release: 0 -License: MIT Summary: Convert text file to viewable screenplay -Url: http://www.screenplain.com/ +License: MIT Group: Development/Languages/Python +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 py2.patch mcepl@suse.com # Don't use open(), but more compatible io.open() Patch0: py2.patch -BuildRequires: python-rpm-macros -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module reportlab} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module pycodestyle} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module reportlab} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildArch: noarch Requires: python-reportlab Requires(post): update-alternatives From bfc270047d0fc0f0aaaa4792897966b25f2488b266075c5d749def4ff372a747 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 3 Dec 2020 21:35:18 +0000 Subject: [PATCH 2/4] Send tarball as well ;) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screenplain?expand=0&rev=4 --- screenplain-0.9.0+git.1597420829.0ff963d.tar.gz | 3 --- screenplain-0.9.0+git.1597423678.4e34d1f.tar.gz | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 screenplain-0.9.0+git.1597420829.0ff963d.tar.gz create mode 100644 screenplain-0.9.0+git.1597423678.4e34d1f.tar.gz diff --git a/screenplain-0.9.0+git.1597420829.0ff963d.tar.gz b/screenplain-0.9.0+git.1597420829.0ff963d.tar.gz deleted file mode 100644 index c4fbe1e..0000000 --- a/screenplain-0.9.0+git.1597420829.0ff963d.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b02872b346f4730d7539e056b3a44ecfc2f556081914c032214ce6d3cdbc4fa5 -size 24496 diff --git a/screenplain-0.9.0+git.1597423678.4e34d1f.tar.gz b/screenplain-0.9.0+git.1597423678.4e34d1f.tar.gz new file mode 100644 index 0000000..f8cce25 --- /dev/null +++ b/screenplain-0.9.0+git.1597423678.4e34d1f.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58b75c58ed06a2b3495f254e768fa1033ed26d655d9a7b73185ae7f23f0b7cf1 +size 24431 From 7f9aa7ebc9566a0b4db26143aa081f403a589995a05adff1b50eb41b35750326 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 3 Dec 2020 22:06:56 +0000 Subject: [PATCH 3/4] - Remove py2.patch, which has been included upstream. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screenplain?expand=0&rev=5 --- py2.patch | 19 ------------------- python-screenplain.changes | 1 + python-screenplain.spec | 3 --- 3 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 py2.patch diff --git a/py2.patch b/py2.patch deleted file mode 100644 index f1cd7c7..0000000 --- a/py2.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/setup.py b/setup.py -index fdc9b53..5db7014 100755 ---- a/setup.py -+++ b/setup.py -@@ -3,9 +3,11 @@ - from setuptools import setup - - # read the contents of your README file --from os import path --this_directory = path.abspath(path.dirname(__file__)) --with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: -+import os.path -+import io -+ -+this_directory = os.path.abspath(os.path.dirname(__file__)) -+with io.open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f: - long_description = f.read() - - setup( diff --git a/python-screenplain.changes b/python-screenplain.changes index 98b1890..7245e00 100644 --- a/python-screenplain.changes +++ b/python-screenplain.changes @@ -3,6 +3,7 @@ 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. ------------------------------------------------------------------- Fri Aug 14 16:29:32 UTC 2020 - mcepl@cepl.eu diff --git a/python-screenplain.spec b/python-screenplain.spec index 7dabac0..843b625 100644 --- a/python-screenplain.spec +++ b/python-screenplain.spec @@ -32,9 +32,6 @@ 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 py2.patch mcepl@suse.com -# Don't use open(), but more compatible io.open() -Patch0: py2.patch BuildRequires: %{python_module pycodestyle} BuildRequires: %{python_module pytest} BuildRequires: %{python_module reportlab} From fa7bf2df4f22b34fac76d52db4290159706c20416de94292fb851404b6c710fb Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 3 Dec 2020 23:11:07 +0000 Subject: [PATCH 4/4] - Add fix_entry_point.patch - We don't need any stinking pytest. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screenplain?expand=0&rev=6 --- fix_entry_point.patch | 19 +++++++++++++++++++ python-screenplain.changes | 2 ++ python-screenplain.spec | 10 ++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 fix_entry_point.patch 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