%global _empty_manifest_terminate_build 0 Name: python-eta Version: 0.9.8f Release: 1 Summary: ETA Progress bar for command-line utilities License: UNKNOWN URL: http://github.com/mbreese/eta/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/df/fb/e93cd79bfe5137a760e381235ec50882d9b9c12ed46b05f5bba7773a2099/eta-0.9.8f.tar.gz BuildArch: noarch %description This is a python package that will create progress bars for command-line programs. Example usage: from eta import ETA eta = ETA(ticks) for foo in bar: eta.print_status() eta.done() Or, file based usage (calls tell() to get progress) fobj = open(fname) eta = ETA(os.stat(fname).st_size, fileobj=fobj) for line in fobj: eta.print_status(extra="extra message") eta.done() The output is something similar to: 20.0% - 0:04 [====> ] ETA: 0:17 (Optional messages go here) The default is to only display the progress bar *if* stderr is connected to a terminal (sys.stderr.isatty() is True). If you want to always enable the progress bar, you need to set the evironmental variable 'SHOW_ETA'. To hide the progress bar (for use in other batch scripts), you can hide the progress bar by setting the environmental variable 'HIDE_ETA'. The default is to update the progress bar every 0.2 sec, unless we aren't attached to a tty (and SHOW_ETA is set). If we aren't attached to a TTY, then no status messages are output to stderr at all. There is also a socket based ETA implementation that will listen to the file /tmp/eta-$pid. If you try to read this file, it will display all of the relevant ETA information for the current process. You can (obviously) only have one active Socket ETA object for each process. You can start this ETA object by setting an environmental variable 'SOCKET_ETA'. %package -n python3-eta Summary: ETA Progress bar for command-line utilities Provides: python-eta BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-eta This is a python package that will create progress bars for command-line programs. Example usage: from eta import ETA eta = ETA(ticks) for foo in bar: eta.print_status() eta.done() Or, file based usage (calls tell() to get progress) fobj = open(fname) eta = ETA(os.stat(fname).st_size, fileobj=fobj) for line in fobj: eta.print_status(extra="extra message") eta.done() The output is something similar to: 20.0% - 0:04 [====> ] ETA: 0:17 (Optional messages go here) The default is to only display the progress bar *if* stderr is connected to a terminal (sys.stderr.isatty() is True). If you want to always enable the progress bar, you need to set the evironmental variable 'SHOW_ETA'. To hide the progress bar (for use in other batch scripts), you can hide the progress bar by setting the environmental variable 'HIDE_ETA'. The default is to update the progress bar every 0.2 sec, unless we aren't attached to a tty (and SHOW_ETA is set). If we aren't attached to a TTY, then no status messages are output to stderr at all. There is also a socket based ETA implementation that will listen to the file /tmp/eta-$pid. If you try to read this file, it will display all of the relevant ETA information for the current process. You can (obviously) only have one active Socket ETA object for each process. You can start this ETA object by setting an environmental variable 'SOCKET_ETA'. %package help Summary: Development documents and examples for eta Provides: python3-eta-doc %description help This is a python package that will create progress bars for command-line programs. Example usage: from eta import ETA eta = ETA(ticks) for foo in bar: eta.print_status() eta.done() Or, file based usage (calls tell() to get progress) fobj = open(fname) eta = ETA(os.stat(fname).st_size, fileobj=fobj) for line in fobj: eta.print_status(extra="extra message") eta.done() The output is something similar to: 20.0% - 0:04 [====> ] ETA: 0:17 (Optional messages go here) The default is to only display the progress bar *if* stderr is connected to a terminal (sys.stderr.isatty() is True). If you want to always enable the progress bar, you need to set the evironmental variable 'SHOW_ETA'. To hide the progress bar (for use in other batch scripts), you can hide the progress bar by setting the environmental variable 'HIDE_ETA'. The default is to update the progress bar every 0.2 sec, unless we aren't attached to a tty (and SHOW_ETA is set). If we aren't attached to a TTY, then no status messages are output to stderr at all. There is also a socket based ETA implementation that will listen to the file /tmp/eta-$pid. If you try to read this file, it will display all of the relevant ETA information for the current process. You can (obviously) only have one active Socket ETA object for each process. You can start this ETA object by setting an environmental variable 'SOCKET_ETA'. %prep %autosetup -n eta-0.9.8f %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-eta -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.9.8f-1 - Package Spec generated