From 87fcc5711788c6080e5b6f1d7a207608c1680b96 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 20 Mar 2025 06:13:32 -0400 Subject: [PATCH] Backport to EPEL10 - Restore -doc subpackage, removed in Fedora - Remove spec-file conditionals and let the branches diverge --- python-OWSLib.spec | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index e73f570..98eb3e0 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -1,5 +1,5 @@ # Not yet in EPEL10: https://bugzilla.redhat.com/show_bug.cgi?id=2324280 -%bcond pytest_httpserver %{undefined el10} +%bcond pytest_httpserver 0 Name: python-OWSLib Version: 0.33.0 @@ -69,21 +69,31 @@ Summary: %{summary} %py_provides python3-owslib -%if %{undefined el10} -# The -doc subpackage was removed for Fedora 42; we can remove this Obsoletes -# after Fedora 44. (EPEL10 never had a -doc subpackage.) -Obsoletes: python-OWSLIB-doc < 0.32.0-1 -%endif - %description -n python3-OWSLib %{common_description} +%package doc +Summary: Documentation and examples for OWSLib + +%description doc +%{summary}. + + %prep %autosetup -n OWSLib-%{version} # Don’t analyze/report test coverage sed -r -i 's/^([[:blank:]]*)(--cov\b)/\1# \2/' tox.ini +# We don’t need shebangs in the examples. The pattern of selecting files +# before modifying them with sed keeps us from unnecessarily discarding the +# original mtimes on unmodified files. +find 'examples' -type f -name '*.py' \ + -exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' | + xargs -r sed -r -i '1{/^#!/d}' +# Some of them, but not all of them, were executable. +chmod -v a-x examples/*.py + %generate_buildrequires %pyproject_buildrequires @@ -167,5 +177,11 @@ ignore="${ignore-} --ignore=tests/test_csw_inspire.py" %doc README.md +%files doc +%license LICENSE +%doc README.md +%doc examples/ + + %changelog %autochangelog