From 3101ac2d60f2360fb0a303c9962efe0ae1827332572a632899940fbe7c269cde Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 8 Nov 2018 19:21:30 +0000 Subject: [PATCH] Accepting request 647320 from home:mslacken:ml fixed the requested things OBS-URL: https://build.opensuse.org/request/show/647320 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astor?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + astor-0.7.1.tar.gz | 3 ++ python-astor.changes | 12 ++++++++ python-astor.spec | 72 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 astor-0.7.1.tar.gz create mode 100644 python-astor.changes create mode 100644 python-astor.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/astor-0.7.1.tar.gz b/astor-0.7.1.tar.gz new file mode 100644 index 0000000..e9150b0 --- /dev/null +++ b/astor-0.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:444eba3e3012ae9ba9276df02a40bf694b9e68f6a95d36062b71aa26f1f3ff6c +size 36886 diff --git a/python-astor.changes b/python-astor.changes new file mode 100644 index 0000000..67df00c --- /dev/null +++ b/python-astor.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Thu Nov 8 14:04:28 UTC 2018 - cgoll@suse.com + +- removed not needed module devel + * removed check section + * using license macro + +------------------------------------------------------------------- +Wed Jul 25 08:13:46 UTC 2018 - cgoll@suse.com + +- initial commit of astor 0.7.1 for python2 and python3 + * skipped check section, as this was faling diff --git a/python-astor.spec b/python-astor.spec new file mode 100644 index 0000000..cfcd324 --- /dev/null +++ b/python-astor.spec @@ -0,0 +1,72 @@ +# +# spec file for package python-astor +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# 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/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + +Name: python-astor +Version: 0.7.1 +Release: 0 +License: BSD-3-Clause +Summary: Read/rewrite/write Python ASTs +Url: https://github.com/berkerpeksag/astor +Group: Development/Languages/Python +Source: https://github.com/berkerpeksag/astor/archive/%{version}.tar.gz#/astor-%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildArch: noarch + +%python_subpackages + +%description +astor is designed to allow easy manipulation of Python source via the AST. +There are some other similar libraries, but astor focuses on the following areas: +- Round-trip an AST back to Python [1]_: + - Modified AST doesn't need linenumbers, ctx, etc. or otherwise + be directly compileable for the round-trip to work. + - Easy to read generated code as, well, code + - Can round-trip two different source trees to compare for functional + differences, using the astor.rtrip tool (for example, after PEP8 edits). +- Dump pretty-printing of AST + - Harder to read than round-tripped code, but more accurate to figure out what + is going on. + - Easier to read than dump from built-in AST module +- Non-recursive treewalk + - Sometimes you want a recursive treewalk (and astor supports that, starting + at any node on the tree), but sometimes you don't need to do that. astor + doesn't require you to explicitly visit sub-nodes unless you want to: + - You can add code that executes before a node's children are visited, and/or + - You can add code that executes after a node's children are visited, and/or + - You can add code that executes and keeps the node's children from being + visited (and optionally visit them yourself via a recursive call) + - Write functions to access the tree based on object names and/or attribute names + - Enjoy easy access to parent node(s) for tree rewriting + +%prep +%setup -q -n astor-%{version} +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%files %{python_files} +%doc AUTHORS README.rst +%license LICENSE +%{python_sitelib}/* + +%changelog