diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-minilog.spec | 264 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 266 insertions, 0 deletions
@@ -0,0 +1 @@ +/minilog-2.1.tar.gz diff --git a/python-minilog.spec b/python-minilog.spec new file mode 100644 index 0000000..d0987f2 --- /dev/null +++ b/python-minilog.spec @@ -0,0 +1,264 @@ +%global _empty_manifest_terminate_build 0 +Name: python-minilog +Version: 2.1 +Release: 1 +Summary: Minimalistic wrapper for Python logging. +License: MIT +URL: https://pypi.org/project/minilog +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/17/89/ee2aaccbec224f0504bcff8918f59521615292ac4aba337fc7e1517baa04/minilog-2.1.tar.gz +BuildArch: noarch + + +%description +# minilog + +A minimalistic logging wrapper for Python. + +[](https://travis-ci.com/jacebrowning/minilog) +[](https://ci.appveyor.com/project/jacebrowning/minilog) +[](https://coveralls.io/r/jacebrowning/minilog) +[](https://scrutinizer-ci.com/g/jacebrowning/minilog) +[](https://pypi.org/project/minilog) +[](https://pypi.org/project/minilog) +[](https://pypistats.org/packages/minilog) + +[](https://pypi.python.org/pypi/verchew) + +## Usage + +Every project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules: + +```python +import logging + +log = logging.getLogger(__name__) + +def greet(name): + log.info("Hello, %s!", name) + +if __name__ == "__main__": + logging.basicConfig( + level=logging.INFO, + format="%(levelname)s: %(name)s: %(message)s", + ) +``` + +with this package you can simply: + +```python +import log + +def greet(name): + log.info("Hello, %s!", name) + +if __name__ == "__main__": + log.init() +``` + +It will produce the exact same standard library `logging` records behind the scenes with automatic formatting for non-strings. + +## Installation + +Install this library directly into an activated virtual environment: + +```text +$ pip install minilog +``` + +or add it to your [Poetry](https://poetry.eustace.io/) project: + +```text +$ poetry add minilog +``` + +## Documentation + +To view additional options, please consult the [full documentation](https://minilog.readthedocs.io/en/latest/logging/). + + +%package -n python3-minilog +Summary: Minimalistic wrapper for Python logging. +Provides: python-minilog +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-minilog +# minilog + +A minimalistic logging wrapper for Python. + +[](https://travis-ci.com/jacebrowning/minilog) +[](https://ci.appveyor.com/project/jacebrowning/minilog) +[](https://coveralls.io/r/jacebrowning/minilog) +[](https://scrutinizer-ci.com/g/jacebrowning/minilog) +[](https://pypi.org/project/minilog) +[](https://pypi.org/project/minilog) +[](https://pypistats.org/packages/minilog) + +[](https://pypi.python.org/pypi/verchew) + +## Usage + +Every project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules: + +```python +import logging + +log = logging.getLogger(__name__) + +def greet(name): + log.info("Hello, %s!", name) + +if __name__ == "__main__": + logging.basicConfig( + level=logging.INFO, + format="%(levelname)s: %(name)s: %(message)s", + ) +``` + +with this package you can simply: + +```python +import log + +def greet(name): + log.info("Hello, %s!", name) + +if __name__ == "__main__": + log.init() +``` + +It will produce the exact same standard library `logging` records behind the scenes with automatic formatting for non-strings. + +## Installation + +Install this library directly into an activated virtual environment: + +```text +$ pip install minilog +``` + +or add it to your [Poetry](https://poetry.eustace.io/) project: + +```text +$ poetry add minilog +``` + +## Documentation + +To view additional options, please consult the [full documentation](https://minilog.readthedocs.io/en/latest/logging/). + + +%package help +Summary: Development documents and examples for minilog +Provides: python3-minilog-doc +%description help +# minilog + +A minimalistic logging wrapper for Python. + +[](https://travis-ci.com/jacebrowning/minilog) +[](https://ci.appveyor.com/project/jacebrowning/minilog) +[](https://coveralls.io/r/jacebrowning/minilog) +[](https://scrutinizer-ci.com/g/jacebrowning/minilog) +[](https://pypi.org/project/minilog) +[](https://pypi.org/project/minilog) +[](https://pypistats.org/packages/minilog) + +[](https://pypi.python.org/pypi/verchew) + +## Usage + +Every project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules: + +```python +import logging + +log = logging.getLogger(__name__) + +def greet(name): + log.info("Hello, %s!", name) + +if __name__ == "__main__": + logging.basicConfig( + level=logging.INFO, + format="%(levelname)s: %(name)s: %(message)s", + ) +``` + +with this package you can simply: + +```python +import log + +def greet(name): + log.info("Hello, %s!", name) + +if __name__ == "__main__": + log.init() +``` + +It will produce the exact same standard library `logging` records behind the scenes with automatic formatting for non-strings. + +## Installation + +Install this library directly into an activated virtual environment: + +```text +$ pip install minilog +``` + +or add it to your [Poetry](https://poetry.eustace.io/) project: + +```text +$ poetry add minilog +``` + +## Documentation + +To view additional options, please consult the [full documentation](https://minilog.readthedocs.io/en/latest/logging/). + + +%prep +%autosetup -n minilog-2.1 + +%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-minilog -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 2.1-1 +- Package Spec generated @@ -0,0 +1 @@ +ccd61928ab684d83266ff83218ba9dd5 minilog-2.1.tar.gz |
