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
This commit is contained in:
commit
3101ac2d60
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
astor-0.7.1.tar.gz
Normal file
3
astor-0.7.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:444eba3e3012ae9ba9276df02a40bf694b9e68f6a95d36062b71aa26f1f3ff6c
|
||||
size 36886
|
12
python-astor.changes
Normal file
12
python-astor.changes
Normal file
@ -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
|
72
python-astor.spec
Normal file
72
python-astor.spec
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user