From db542e4e52a14b0df2fb9b9a5ff402ac0170095c Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 25 Aug 2021 16:58:09 -0400 Subject: [PATCH] Initial import (#1995676) --- .gitignore | 1 + python-autopage.spec | 91 ++++++++++++++++++++++++++++++++++++++++++++ setup.py | 3 ++ sources | 1 + 4 files changed, 96 insertions(+) create mode 100644 .gitignore create mode 100644 python-autopage.spec create mode 100644 setup.py create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4904273 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/autopage-0.4.0.tar.gz diff --git a/python-autopage.spec b/python-autopage.spec new file mode 100644 index 0000000..af1359b --- /dev/null +++ b/python-autopage.spec @@ -0,0 +1,91 @@ +%global srcname autopage + +# Macros for pyproject (Fedora) vs. setup.py (CentOS) +%if 0%{?fedora} +%bcond_without pyproject +%else +%bcond_with pyproject +%endif + +Name: python-%{srcname} +Version: 0.4.0 +Release: 1%{?dist} +Summary: A Python library to provide automatic paging for console output +License: ASL 2.0 +URL: https://pypi.python.org/pypi/autopage +Source0: %{pypi_source} +Source1: setup.py + +BuildArch: noarch + +%global _description %{expand: +Autopage is a Python library to provide automatic paging for console output.} + + +%description %_description + +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-devel +%if %{with pyproject} +BuildRequires: pyproject-rpm-macros +%else +BuildRequires: %{py3_dist fixtures} +%endif + +%description -n python3-%{srcname} %_description + +%prep +%autosetup -n %{srcname}-%{version} + +%if %{with pyproject} +%generate_buildrequires +%pyproject_buildrequires -e pep8,%{toxenv} +%else +cp %{SOURCE1} ./ +%endif + +%build +%if %{with pyproject} +%pyproject_wheel +%else +%py3_build +%endif + +%install +%if %{with pyproject} +%pyproject_install +%pyproject_save_files autopage +%else +%py3_install +%endif + +%check +%if %{with pyproject} +%tox +%else +%{python3} setup.py test +%endif + +%if %{with pyproject} +%files -n python3-%{srcname} -f %{pyproject_files} +%else +%files -n python3-%{srcname} +%{python3_sitelib}/%{srcname}-*.egg-info/ +%{python3_sitelib}/%{srcname}/ +%endif +%license LICENSE +%doc README.md + +%changelog +* Mon Jul 12 2021 Zane Bitter 0.4.0-1 +- Update to v0.4.0 + +* Fri Jun 25 2021 Zane Bitter 0.3.1-1 +- Update to v0.3.1 for easier packaging + +* Fri Jun 25 2021 Zane Bitter 0.3.0-2 +- Support building for EPEL + +* Fri Jun 18 2021 Zane Bitter 0.3.0-1 +- Initial build diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..37f64cf --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup + +setup(install_requires=["setuptools>=30.3.0"]) diff --git a/sources b/sources new file mode 100644 index 0000000..a5b7f00 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (autopage-0.4.0.tar.gz) = 00dd0fc405c6cbeec962e0c6e85ff923c6c8caefd9cb793d668117ae6b25d1086253b4103bc541c35f3883caf7f72f0ef2f5758ca2ce3f7fbef39ac51a188b9c