From 3f4719a75d5ae4d18bfcfe40d79d9e5383ccb9054923c7c4fb46e70f43a42b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 10 Sep 2019 13:47:02 +0000 Subject: [PATCH] - Add patch to build with py 3.8: * python38.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astor?expand=0&rev=7 --- python-astor.changes | 6 ++++++ python-astor.spec | 14 +++++++------- python38.patch | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 python38.patch diff --git a/python-astor.changes b/python-astor.changes index 784b9b1..5b57cb9 100644 --- a/python-astor.changes +++ b/python-astor.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 10 13:45:54 UTC 2019 - Tomáš Chvátal + +- Add patch to build with py 3.8: + * python38.patch + ------------------------------------------------------------------- Mon Jun 3 08:18:07 UTC 2019 - pgajdos@suse.com diff --git a/python-astor.spec b/python-astor.spec index 8e31fec..d5a681d 100644 --- a/python-astor.spec +++ b/python-astor.spec @@ -17,24 +17,23 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} - Name: python-astor Version: 0.8 Release: 0 Summary: Read/rewrite/write Python ASTs License: BSD-3-Clause Group: Development/Languages/Python -Url: https://github.com/berkerpeksag/astor +URL: https://github.com/berkerpeksag/astor Source: https://github.com/berkerpeksag/astor/archive/%{version}.tar.gz#/astor-%{version}.tar.gz +Patch0: python38.patch BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module nose} BuildRequires: python2-unittest2 # /SECTION -BuildRequires: fdupes -BuildRequires: python-rpm-macros -BuildArch: noarch - %python_subpackages %description @@ -63,6 +62,7 @@ There are some other similar libraries, but astor focuses on the following areas %prep %setup -q -n astor-%{version} +%patch0 -p1 # ugly fix for the use of /usr/bin/env sed -i 's@env @@' astor/rtrip.py @@ -80,7 +80,7 @@ sed -i 's@env @@' astor/rtrip.py %files %{python_files} %doc AUTHORS README.rst docs/*.rst -%license LICENSE +%license LICENSE %{python_sitelib}/* %changelog diff --git a/python38.patch b/python38.patch new file mode 100644 index 0000000..53b4311 --- /dev/null +++ b/python38.patch @@ -0,0 +1,25 @@ +From ab682f6ded42f0a779986a31d8bc033e4d8ae909 Mon Sep 17 00:00:00 2001 +From: isidentical +Date: Mon, 2 Sep 2019 20:07:41 +0300 +Subject: [PATCH] put 2 newlines between func defs, resolves #156 + +--- + tests/test_code_gen.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test_code_gen.py b/tests/test_code_gen.py +index 3cb7e64..c4935ae 100644 +--- a/tests/test_code_gen.py ++++ b/tests/test_code_gen.py +@@ -171,9 +171,11 @@ def test_positional_only_arguments(self): + def test(a, b, /, c, *, d, **kwargs): + pass + ++ + def test(a=3, b=4, /, c=7): + pass + ++ + def test(a, b=4, /, c=8, d=9): + pass + """