From 05f5906a345151c0e84fa5121a7a5c7b6ac3279b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 11 Apr 2023 00:28:29 +0000 Subject: automatic import of python-inspecta --- python-inspecta.spec | 396 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 396 insertions(+) create mode 100644 python-inspecta.spec (limited to 'python-inspecta.spec') diff --git a/python-inspecta.spec b/python-inspecta.spec new file mode 100644 index 0000000..25951d8 --- /dev/null +++ b/python-inspecta.spec @@ -0,0 +1,396 @@ +%global _empty_manifest_terminate_build 0 +Name: python-inspecta +Version: 0.1.3 +Release: 1 +Summary: A colorized object pretty printer - for Python. +License: MIT +URL: https://github.com/grimen/python-inspecta +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/74/40/3703630202705f96bd08a32a74ef7772345f7e84109915caeed057eeaff8/inspecta-0.1.3.tar.gz +BuildArch: noarch + +Requires: python3-rootpath +Requires: python3-six +Requires: python3-pygments +Requires: python3-termcolor +Requires: python3-colour-runner +Requires: python3-deepdiff +Requires: python3-tox +Requires: python3-coverage +Requires: python3-codecov + +%description + +# `inspecta` [![PyPI version](https://badge.fury.io/py/inspecta.svg)](https://badge.fury.io/py/inspecta) [![Build Status](https://travis-ci.com/grimen/python-inspecta.svg?branch=master)](https://travis-ci.com/grimen/python-inspecta) [![Coverage Status](https://codecov.io/gh/grimen/python-inspecta/branch/master/graph/badge.svg)](https://codecov.io/gh/grimen/python-inspecta) + +*A colorized object pretty printer - for Python.* + +## Introduction + +The default `pprint` is not human friendly enough - color syntax highlighting to the rescue. + + +## Install + +Install using **pip**: + +```sh +$ pip install inspecta +``` + + +## Use + +Very basic **[example](https://github.com/grimen/python-inspecta/tree/master/examples/basic.py)**: + +```python +import inspecta + +data = { + 'foo': { + 'bar': { + 'baz': [ + { + 'a': 1, + 'b': 'two', + 'c': ('three', 4, 'five') + } + ] + } + }, + 'bar': [1, 2, 3], + 'baz': True +} + +print('\n.inspect(data)\n') + +print(inspecta.inspect(data)) + +print('\n.print(data)\n') + +inspecta.print(data) +``` + +Run this with optional environment variables `COLORS` / `ERROR_COLORS` set too truthy or falsy values, so see various error info formatting in terminal. + +Something like this (imagine some colorized formatting): + +```bash + +.inspect(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +.print(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +``` + + +## Test + +Clone down source code: + +```sh +$ make install +``` + +Run **colorful tests**, with only native environment (dependency sandboxing up to you): + +```sh +$ make test +``` + +Run **less colorful tests**, with **multi-environment** (using **tox**): + +```sh +$ make test-tox +``` + + +## About + +This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used. + + +## License + +Released under the MIT license. + + + + +%package -n python3-inspecta +Summary: A colorized object pretty printer - for Python. +Provides: python-inspecta +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-inspecta + +# `inspecta` [![PyPI version](https://badge.fury.io/py/inspecta.svg)](https://badge.fury.io/py/inspecta) [![Build Status](https://travis-ci.com/grimen/python-inspecta.svg?branch=master)](https://travis-ci.com/grimen/python-inspecta) [![Coverage Status](https://codecov.io/gh/grimen/python-inspecta/branch/master/graph/badge.svg)](https://codecov.io/gh/grimen/python-inspecta) + +*A colorized object pretty printer - for Python.* + +## Introduction + +The default `pprint` is not human friendly enough - color syntax highlighting to the rescue. + + +## Install + +Install using **pip**: + +```sh +$ pip install inspecta +``` + + +## Use + +Very basic **[example](https://github.com/grimen/python-inspecta/tree/master/examples/basic.py)**: + +```python +import inspecta + +data = { + 'foo': { + 'bar': { + 'baz': [ + { + 'a': 1, + 'b': 'two', + 'c': ('three', 4, 'five') + } + ] + } + }, + 'bar': [1, 2, 3], + 'baz': True +} + +print('\n.inspect(data)\n') + +print(inspecta.inspect(data)) + +print('\n.print(data)\n') + +inspecta.print(data) +``` + +Run this with optional environment variables `COLORS` / `ERROR_COLORS` set too truthy or falsy values, so see various error info formatting in terminal. + +Something like this (imagine some colorized formatting): + +```bash + +.inspect(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +.print(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +``` + + +## Test + +Clone down source code: + +```sh +$ make install +``` + +Run **colorful tests**, with only native environment (dependency sandboxing up to you): + +```sh +$ make test +``` + +Run **less colorful tests**, with **multi-environment** (using **tox**): + +```sh +$ make test-tox +``` + + +## About + +This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used. + + +## License + +Released under the MIT license. + + + + +%package help +Summary: Development documents and examples for inspecta +Provides: python3-inspecta-doc +%description help + +# `inspecta` [![PyPI version](https://badge.fury.io/py/inspecta.svg)](https://badge.fury.io/py/inspecta) [![Build Status](https://travis-ci.com/grimen/python-inspecta.svg?branch=master)](https://travis-ci.com/grimen/python-inspecta) [![Coverage Status](https://codecov.io/gh/grimen/python-inspecta/branch/master/graph/badge.svg)](https://codecov.io/gh/grimen/python-inspecta) + +*A colorized object pretty printer - for Python.* + +## Introduction + +The default `pprint` is not human friendly enough - color syntax highlighting to the rescue. + + +## Install + +Install using **pip**: + +```sh +$ pip install inspecta +``` + + +## Use + +Very basic **[example](https://github.com/grimen/python-inspecta/tree/master/examples/basic.py)**: + +```python +import inspecta + +data = { + 'foo': { + 'bar': { + 'baz': [ + { + 'a': 1, + 'b': 'two', + 'c': ('three', 4, 'five') + } + ] + } + }, + 'bar': [1, 2, 3], + 'baz': True +} + +print('\n.inspect(data)\n') + +print(inspecta.inspect(data)) + +print('\n.print(data)\n') + +inspecta.print(data) +``` + +Run this with optional environment variables `COLORS` / `ERROR_COLORS` set too truthy or falsy values, so see various error info formatting in terminal. + +Something like this (imagine some colorized formatting): + +```bash + +.inspect(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +.print(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +``` + + +## Test + +Clone down source code: + +```sh +$ make install +``` + +Run **colorful tests**, with only native environment (dependency sandboxing up to you): + +```sh +$ make test +``` + +Run **less colorful tests**, with **multi-environment** (using **tox**): + +```sh +$ make test-tox +``` + + +## About + +This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used. + + +## License + +Released under the MIT license. + + + + +%prep +%autosetup -n inspecta-0.1.3 + +%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-inspecta -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot - 0.1.3-1 +- Package Spec generated -- cgit v1.2.3