From 661d0f66c9f0f717978e6d669a418a14686c04db Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 9 Mar 2023 17:39:19 +0000 Subject: automatic import of python-tree-format --- python-tree-format.spec | 248 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 248 insertions(+) create mode 100644 python-tree-format.spec (limited to 'python-tree-format.spec') diff --git a/python-tree-format.spec b/python-tree-format.spec new file mode 100644 index 0000000..c65dc4f --- /dev/null +++ b/python-tree-format.spec @@ -0,0 +1,248 @@ +%global _empty_manifest_terminate_build 0 +Name: python-tree-format +Version: 0.1.2 +Release: 1 +Summary: please add a summary manually as the author left a blank one +License: Apache Software License +URL: http://github.com/jml/tree-format +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0d/91/8d860c75c3e70e6bbec7b898b5f753bf5da404be9296e245034360759645/tree-format-0.1.2.tar.gz +BuildArch: noarch + +Requires: python3-pytest +Requires: python3-testtools + +%description +Python library to generate nicely formatted trees, like the UNIX `tree` +command. + +## Example + +Produce output like this: + +``` +foo +├── bar +│ ├── a +│ └── b +├── baz +└── qux + └── c⏎ + d +``` + +using code like this: + +```python +from operator import itemgetter + +from tree_format import format_tree + +tree = ( + 'foo', [ + ('bar', [ + ('a', []), + ('b', []), + ]), + ('baz', []), + ('qux', [ + ('c\nd', []), + ]), + ], +) + +print format_tree( + tree, format_node=itemgetter(0), get_children=itemgetter(1)) +``` + +## License + +This is made available under the Apache Software License, version 2.0. + +Copyright (c) 2015 - Jonathan M. Lange + +## Testing + +Run tests with: + +``` +python -m testtools.run discover +``` + + + + + +%package -n python3-tree-format +Summary: please add a summary manually as the author left a blank one +Provides: python-tree-format +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-tree-format +Python library to generate nicely formatted trees, like the UNIX `tree` +command. + +## Example + +Produce output like this: + +``` +foo +├── bar +│ ├── a +│ └── b +├── baz +└── qux + └── c⏎ + d +``` + +using code like this: + +```python +from operator import itemgetter + +from tree_format import format_tree + +tree = ( + 'foo', [ + ('bar', [ + ('a', []), + ('b', []), + ]), + ('baz', []), + ('qux', [ + ('c\nd', []), + ]), + ], +) + +print format_tree( + tree, format_node=itemgetter(0), get_children=itemgetter(1)) +``` + +## License + +This is made available under the Apache Software License, version 2.0. + +Copyright (c) 2015 - Jonathan M. Lange + +## Testing + +Run tests with: + +``` +python -m testtools.run discover +``` + + + + + +%package help +Summary: Development documents and examples for tree-format +Provides: python3-tree-format-doc +%description help +Python library to generate nicely formatted trees, like the UNIX `tree` +command. + +## Example + +Produce output like this: + +``` +foo +├── bar +│ ├── a +│ └── b +├── baz +└── qux + └── c⏎ + d +``` + +using code like this: + +```python +from operator import itemgetter + +from tree_format import format_tree + +tree = ( + 'foo', [ + ('bar', [ + ('a', []), + ('b', []), + ]), + ('baz', []), + ('qux', [ + ('c\nd', []), + ]), + ], +) + +print format_tree( + tree, format_node=itemgetter(0), get_children=itemgetter(1)) +``` + +## License + +This is made available under the Apache Software License, version 2.0. + +Copyright (c) 2015 - Jonathan M. Lange + +## Testing + +Run tests with: + +``` +python -m testtools.run discover +``` + + + + + +%prep +%autosetup -n tree-format-0.1.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-tree-format -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot - 0.1.2-1 +- Package Spec generated -- cgit v1.2.3