From 2ea1ac313d21be80f8fe876ef3d5625fbcc3316d Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 24 May 2023 12:42:08 +1200 Subject: [PATCH 1/4] Clear build history for EPEL --- python-autopage.spec | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/python-autopage.spec b/python-autopage.spec index c2cb9d2..a93a769 100644 --- a/python-autopage.spec +++ b/python-autopage.spec @@ -17,7 +17,7 @@ Name: python-%{srcname} Version: 0.5.1 -Release: 4%{?dist} +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 @@ -90,35 +90,5 @@ cp %{SOURCE1} ./ %doc README.md %changelog -* Fri Jan 20 2023 Fedora Release Engineering - 0.5.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 0.5.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jun 15 2022 Python Maint - 0.5.1-2 -- Rebuilt for Python 3.11 - -* Fri May 27 2022 Zane Bitter 0.5.1-1 -- Update to v0.5.1 to fix test reliability - -* Fri Jan 21 2022 Zane Bitter 0.5.0-1 -- Update to v0.5.0 - -* Fri Jan 21 2022 Fedora Release Engineering - 0.4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Oct 27 2021 Zane Bitter 0.4.0-2 -- Update specfile to build for more distros - -* 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 +* Wed May 24 2023 Zane Bitter 0.5.1-1 +- Initial build for EPEL 9 From e634e76b330a09802c8d73448cc4f961b1f65295 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 25 May 2023 01:06:55 +1200 Subject: [PATCH 2/4] Fix hang in unit testing Because the unit tests use multiprocessing, we must avoid launching setuptools again when we spawn a child process. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 37f64cf..b74842f 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ from setuptools import setup -setup(install_requires=["setuptools>=30.3.0"]) +if __name__ == '__main__': + setup(install_requires=["setuptools>=30.3.0"]) From 93a096f25705bfea2cdd66854e2b12db77293bb1 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 3 Jul 2023 19:52:29 +0200 Subject: [PATCH 3/4] Don't require linters for Fedora build Usage of the linters is discouraged when packaging downstream. Source: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters --- python-autopage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-autopage.spec b/python-autopage.spec index a93a769..e46280d 100644 --- a/python-autopage.spec +++ b/python-autopage.spec @@ -50,7 +50,7 @@ BuildRequires: %{py3_dist fixtures} %if %{with pyproject} %generate_buildrequires -%pyproject_buildrequires -e pep8,%{toxenv} +%pyproject_buildrequires -t %else cp %{SOURCE1} ./ %endif From 9947c1c32b520f966d769213cf3d16adc001200c Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 16 Oct 2023 22:43:04 +1300 Subject: [PATCH 4/4] Update to version 0.5.2 from upstream Fix integration tests with less v633 and make them reliable again. --- .gitignore | 1 + 0001-Do-not-depend-on-fixtures-streams.patch | 29 ++++++++++++++++++++ python-autopage.spec | 14 +++++++++- sources | 2 +- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 0001-Do-not-depend-on-fixtures-streams.patch diff --git a/.gitignore b/.gitignore index f271a02..3a9dbf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /autopage-0.4.0.tar.gz /autopage-0.5.0.tar.gz /autopage-0.5.1.tar.gz +/autopage-0.5.2.tar.gz diff --git a/0001-Do-not-depend-on-fixtures-streams.patch b/0001-Do-not-depend-on-fixtures-streams.patch new file mode 100644 index 0000000..d27cce3 --- /dev/null +++ b/0001-Do-not-depend-on-fixtures-streams.patch @@ -0,0 +1,29 @@ +From 5cb057af95db1f7a00f6b393401b1ca4f6a2cd14 Mon Sep 17 00:00:00 2001 +From: Zane Bitter +Date: Mon, 16 Oct 2023 23:07:52 +1300 +Subject: [PATCH] Do not depend on fixtures[streams] + +The streams extra is not yet packaged in Fedora, so we can't depend on +it. Instead, depend on testtools directly. +--- + tox.ini | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/tox.ini b/tox.ini +index 8e54cba..3b2ed0a 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -6,9 +6,8 @@ isolated_build = true + deps = + pytest + fixtures +- fixtures[streams] + pip>=19;python_version<'3.7' +- testtools;python_version<'3.7' ++ testtools + commands = + pytest + +-- +2.41.0 + diff --git a/python-autopage.spec b/python-autopage.spec index e46280d..7a56550 100644 --- a/python-autopage.spec +++ b/python-autopage.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} -Version: 0.5.1 +Version: 0.5.2 Release: 1%{?dist} Summary: A Python library to provide automatic paging for console output License: ASL 2.0 @@ -24,6 +24,10 @@ URL: https://pypi.python.org/pypi/autopage Source0: %{pypi_source} Source1: setup.py +# autopage should ideally require fixtures[streams], but we don't have that +# packaged in Fedora yet. +Patch1: 0001-Do-not-depend-on-fixtures-streams.patch + BuildArch: noarch %global _description %{expand: @@ -40,6 +44,10 @@ BuildRequires: pyproject-rpm-macros %else %if %{with enable_tests} BuildRequires: %{py3_dist fixtures} +# autopage should ideally require fixtures[streams], but we don't have that +# packaged in Fedora yet. Once that is available, we can depend on only that +# instead of testtools. +BuildRequires: %{py3_dist testtools} %endif %endif @@ -90,5 +98,9 @@ cp %{SOURCE1} ./ %doc README.md %changelog +* Mon Oct 16 2023 Zane Bitter 0.5.2-1 +- Fix tests with less v633 +- Fix test reliability + * Wed May 24 2023 Zane Bitter 0.5.1-1 - Initial build for EPEL 9 diff --git a/sources b/sources index 8ed3583..aecfd87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (autopage-0.5.1.tar.gz) = d2db8091bfdb209319ed8f06cea86abdc33e8ea338290d3a6f99341d78d8a9f079021c21c18c9ee7032f13496ed0d3bfe5a96465473fc747da984452d26c0382 +SHA512 (autopage-0.5.2.tar.gz) = a5449fc2a1011a3936c69784803e9f65a603cfa6df2335b095b029051fc26742109141ef2eb201f567334c0617433f29477efc43d98357d7ee00f266c6546560