diff --git a/autopage-0.5.0.tar.gz b/autopage-0.5.0.tar.gz new file mode 100644 index 0000000..f266579 Binary files /dev/null and b/autopage-0.5.0.tar.gz differ diff --git a/python-autopage.spec b/python-autopage.spec new file mode 100644 index 0000000..0fcb57d --- /dev/null +++ b/python-autopage.spec @@ -0,0 +1,98 @@ +%global _empty_manifest_terminate_build 0 +Name: python-autopage +Version: 0.5.0 +Release: 1 +Summary: A library to provide automatic paging for console output +License: Apache-2.0 +URL: https://github.com/zaneb/autopage +Source0: https://files.pythonhosted.org/packages/d1/1c/aaaf5bcb9f37e3d17e040a83de5a35c6cb29fc9ce45412cc8224a570fe30/autopage-0.5.0.tar.gz +Source1: setup.py +BuildArch: noarch +%description + autopage[Autopage]( is a Python library to automatically display terminal +output from a program in a pager (like less) whenever you need it, and never +when you don't. And it only takes one line of You know how some CLI programs +like git (and a handful of others, including man and systemctl) automatically +pipe their output to less? Except not if there's less than one screen's worth of +data. And if you redirect the output to a file or a pipe, it does the right +thing instead. Colours are preserved. Don't you wish all programs worked like +that? Now at least all of your Python programs can. + +%package -n python3-autopage +Summary: A library to provide automatic paging for console output +Provides: python-autopage +# Base build requires +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +%description -n python3-autopage + autopage[Autopage]( is a Python library to automatically display terminal +output from a program in a pager (like less) whenever you need it, and never +when you don't. And it only takes one line of You know how some CLI programs +like git (and a handful of others, including man and systemctl) automatically +pipe their output to less? Except not if there's less than one screen's worth of +data. And if you redirect the output to a file or a pipe, it does the right +thing instead. Colours are preserved. Don't you wish all programs worked like +that? Now at least all of your Python programs can. + +%package help +Summary: A library to provide automatic paging for console output +Provides: python3-autopage-doc +%description help + autopage[Autopage]( is a Python library to automatically display terminal +output from a program in a pager (like less) whenever you need it, and never +when you don't. And it only takes one line of You know how some CLI programs +like git (and a handful of others, including man and systemctl) automatically +pipe their output to less? Except not if there's less than one screen's worth of +data. And if you redirect the output to a file or a pipe, it does the right +thing instead. Colours are preserved. Don't you wish all programs worked like +that? Now at least all of your Python programs can. + +%prep +%autosetup -n autopage-%{version} +cp %{SOURCE1} ./ + +%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-autopage -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jul 12 2022 OpenStack_SIG - 0.5.0-1 +- Init package python3-autopage of version 0.5.0 + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e2352a5 --- /dev/null +++ b/setup.py @@ -0,0 +1,4 @@ +from setuptools import setup + +setup(install_requires=["setuptools>=30.3.0"]) +