- 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
This commit is contained in:
Tomáš Chvátal 2019-09-10 13:47:02 +00:00 committed by Git OBS Bridge
parent 584e9ff98f
commit 3f4719a75d
3 changed files with 38 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 10 13:45:54 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to build with py 3.8:
* python38.patch
-------------------------------------------------------------------
Mon Jun 3 08:18:07 UTC 2019 - pgajdos@suse.com

View File

@ -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

25
python38.patch Normal file
View File

@ -0,0 +1,25 @@
From ab682f6ded42f0a779986a31d8bc033e4d8ae909 Mon Sep 17 00:00:00 2001
From: isidentical <batuhanosmantaskaya@gmail.com>
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
"""