From cc700e9b9b5e19fe200d7a1bae80af69c1c2ae99 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 16 Nov 2022 08:07:16 -0500 Subject: [PATCH 01/13] Initial package for EPEL9 - Disabled PDF documentation due to missing dependencies --- python-OWSLib.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index 5c545e4..b87aaed 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -1,8 +1,12 @@ # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # -# We can generate PDF documentation as a substitute. -%bcond_without doc_pdf +# We can generate PDF documentation as a substitute. However, EPEL9 is +# currently missing some documentation dependencies: +# - python-ipykernel +# - python-nbconvert +# - python-nbsphinx +%bcond_with doc_pdf Name: python-OWSLib Version: 0.27.2 From 90ff95b3fab2e09a88f782772c17fd04a09c3546 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 30 Nov 2022 11:43:57 -0500 Subject: [PATCH 02/13] Drop default argument -r for pyproject_buildrequires --- python-OWSLib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index b87aaed..3fa9b99 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -90,7 +90,7 @@ echo 'nbsphinx_allow_errors = True' >> docs/conf.py %generate_buildrequires -%pyproject_buildrequires -r requirements-dev-filtered.txt +%pyproject_buildrequires requirements-dev-filtered.txt %build From 08da30ae5c23bb0d5ffb6ffcb074c37db034c08e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 20 Feb 2023 09:44:13 -0500 Subject: [PATCH 03/13] Update to 0.28.0 (close RHBZ#2171409) --- .gitignore | 1 + python-OWSLib.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a9a908e..8fdbdf1 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /OWSLib-0.25.0.tar.gz /OWSLib-0.26.0.tar.gz /OWSLib-0.27.2.tar.gz +/OWSLib-0.28.0.tar.gz diff --git a/python-OWSLib.spec b/python-OWSLib.spec index 3fa9b99..8c11caa 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -9,7 +9,7 @@ %bcond_with doc_pdf Name: python-OWSLib -Version: 0.27.2 +Version: 0.28.0 Release: %autorelease Summary: Client library for OGC web services diff --git a/sources b/sources index 3d2520a..897ee95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (OWSLib-0.27.2.tar.gz) = 02c70731ef92783d53b8f0dff2cec7d28d14ac08b0a4b5090183f9eacf156d539c823fcd2ae480c07447e901697de498cdf2aaf27c8b6d46fa4cf8eb3679ceee +SHA512 (OWSLib-0.28.0.tar.gz) = 4a5002a05c1616ca382aa85561cee950c707488feb37f0f29232758159abcef8545980361cb976240e9026937557ab349764f84c95091f9f3df8698498f47fde From f35d034de62b3c7dbbcd6ab6e5e9a81121520c45 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 24 Feb 2023 14:44:13 -0500 Subject: [PATCH 04/13] Update to 0.28.1 (close RHBZ#2173195) --- .gitignore | 1 + python-OWSLib.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8fdbdf1..89531ed 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /OWSLib-0.26.0.tar.gz /OWSLib-0.27.2.tar.gz /OWSLib-0.28.0.tar.gz +/OWSLib-0.28.1.tar.gz diff --git a/python-OWSLib.spec b/python-OWSLib.spec index 8c11caa..fc46efb 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -9,7 +9,7 @@ %bcond_with doc_pdf Name: python-OWSLib -Version: 0.28.0 +Version: 0.28.1 Release: %autorelease Summary: Client library for OGC web services diff --git a/sources b/sources index 897ee95..6ddf3e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (OWSLib-0.28.0.tar.gz) = 4a5002a05c1616ca382aa85561cee950c707488feb37f0f29232758159abcef8545980361cb976240e9026937557ab349764f84c95091f9f3df8698498f47fde +SHA512 (OWSLib-0.28.1.tar.gz) = bd62a5e371e64e0e256cc83d2f044294c20965f6b107b0dd9074ac752971620f01af4c7fc9a82e43dc81e71a6a36696b75403012841c28925b017d9c47b2d4a5 From efa3eb4f307005b3d6e0aeb2d03c2b6e148d5d1a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 8 Mar 2023 09:38:19 -0500 Subject: [PATCH 05/13] Move some text doc files to the -doc subpackage --- python-OWSLib.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index fc46efb..e824547 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -149,13 +149,13 @@ k="${k-}${k+ and } not (TestOffline and test_wms_130_remotemd_parse_single)" %files -n python3-OWSLib -f %{pyproject_files} # pyproject_files handles LICENSE; verify with “rpm -qL -p …” -%doc AUTHORS.rst -%doc CHANGES.rst -%doc README.rst %files doc %license LICENSE +%doc AUTHORS.rst +%doc CHANGES.rst +%doc README.rst %doc examples %if %{with doc_pdf} %doc docs/build/latex/en/OWSLib.pdf From 4f7710c077e3dc8d7e30ca37bb3a4fabedf0362a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 18 Mar 2023 08:41:52 -0400 Subject: [PATCH 06/13] =?UTF-8?q?Don=E2=80=99t=20assume=20%=5Fsmp=5Fmflags?= =?UTF-8?q?=20is=20-j%=5Fsmp=5Fbuild=5Fncpus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python-OWSLib.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index e824547..daeb632 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -97,7 +97,8 @@ echo 'nbsphinx_allow_errors = True' >> docs/conf.py %pyproject_wheel %if %{with doc_pdf} -PYTHONPATH="${PWD}" %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' +PYTHONPATH="${PWD}" %make_build -C docs latex \ + SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/build/latex/en LATEXMKOPTS='-quiet' %endif From 50d60485c80732a1b1225ee53bb1dd6d6c3c119c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 28 May 2023 13:04:15 -0400 Subject: [PATCH 07/13] Do not number the sole Source [skip changelog] --- python-OWSLib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index daeb632..dd4e1e5 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -15,7 +15,7 @@ Summary: Client library for OGC web services License: BSD-3-Clause URL: https://geopython.github.io/OWSLib -Source0: https://github.com/geopython/OWSLib/archive/%{version}/OWSLib-%{version}.tar.gz +Source: https://github.com/geopython/OWSLib/archive/%{version}/OWSLib-%{version}.tar.gz BuildArch: noarch From 58daffda35728562ccac96b677d55217d4640391 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 28 May 2023 13:04:49 -0400 Subject: [PATCH 08/13] Shorten a long line by using a macro [skip changelog] --- python-OWSLib.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index dd4e1e5..c0e22d6 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -15,7 +15,8 @@ Summary: Client library for OGC web services License: BSD-3-Clause URL: https://geopython.github.io/OWSLib -Source: https://github.com/geopython/OWSLib/archive/%{version}/OWSLib-%{version}.tar.gz +%global forgeurl https://github.com/geopython/OWSLib +Source: %{forgeurl}/archive/%{version}/OWSLib-%{version}.tar.gz BuildArch: noarch From 50c359be7f7e15b31fc31bb46512d067895ae83d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 20 Jun 2023 09:26:38 -0400 Subject: [PATCH 09/13] Use new (rpm 4.17.1+) bcond style --- python-OWSLib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index c0e22d6..d5b9a05 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -6,7 +6,7 @@ # - python-ipykernel # - python-nbconvert # - python-nbsphinx -%bcond_with doc_pdf +%bcond doc_pdf 0 Name: python-OWSLib Version: 0.28.1 From e4bfed3048f32dc3553912ef9026086b2eb572da Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 18 Dec 2023 13:03:08 -0500 Subject: [PATCH 10/13] Assert that %pyproject_files contains a license file --- python-OWSLib.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index d5b9a05..4d0aa93 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -106,7 +106,7 @@ PYTHONPATH="${PWD}" %make_build -C docs latex \ %install %pyproject_install -%pyproject_save_files owslib +%pyproject_save_files -l owslib %check @@ -150,7 +150,6 @@ k="${k-}${k+ and } not (TestOffline and test_wms_130_remotemd_parse_single)" %files -n python3-OWSLib -f %{pyproject_files} -# pyproject_files handles LICENSE; verify with “rpm -qL -p …” %files doc From 957b30f912321a1a39a3dbb76a2fb18ca2567657 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 20 Mar 2024 15:10:56 -0400 Subject: [PATCH 11/13] Add an rpmlintrc file [skip changelog] --- python-OWSLib.rpmlintrc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 python-OWSLib.rpmlintrc diff --git a/python-OWSLib.rpmlintrc b/python-OWSLib.rpmlintrc new file mode 100644 index 0000000..981f880 --- /dev/null +++ b/python-OWSLib.rpmlintrc @@ -0,0 +1,2 @@ +# All documentation is in the -doc subpackage. +addFilter(r" no-documentation$") From fd2014ec9e246ec5e43775e6425f511a45f1f3a5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 20 Mar 2024 15:12:02 -0400 Subject: [PATCH 12/13] Update Summary from upstream --- python-OWSLib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-OWSLib.spec b/python-OWSLib.spec index 4d0aa93..c386c18 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -11,7 +11,7 @@ Name: python-OWSLib Version: 0.28.1 Release: %autorelease -Summary: Client library for OGC web services +Summary: OGC Web Service utility library License: BSD-3-Clause URL: https://geopython.github.io/OWSLib From 9b833bff57253b503eba29a7f4b6122d69207733 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 13 Nov 2024 07:43:30 -0500 Subject: [PATCH 13/13] Omit test data files with unclear license status --- .gitignore | 1 + get_source | 63 ++++++++++++++++++++++++++++++++++ python-OWSLib.spec | 85 +++++++++++++++++++++++++++------------------- sources | 2 +- 4 files changed, 116 insertions(+), 35 deletions(-) create mode 100755 get_source diff --git a/.gitignore b/.gitignore index 89531ed..f49408a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /OWSLib-0.27.2.tar.gz /OWSLib-0.28.0.tar.gz /OWSLib-0.28.1.tar.gz +/OWSLib-0.28.1-filtered.tar.zst diff --git a/get_source b/get_source new file mode 100755 index 0000000..085fbb8 --- /dev/null +++ b/get_source @@ -0,0 +1,63 @@ +#!/bin/sh +set -o nounset +set -o errexit + +FORGEURL='https://github.com/geopython/OWSLib' + +print_help() +{ + cat <&2 + print_help "${0}" + exit 1 +elif [ "${1-}" = '-h' ] || [ "${1-}" = '--help' ] +then + print_help "${0}" + exit 0 +fi + +VERSION="${1}" +SOURCE0="${FORGEURL}/archive/${VERSION}/OWSLib-${VERSION}.tar.gz" +TARNAME="$(basename "${SOURCE0}")" +TARDIR="$(basename "${SOURCE0}" '.tar.gz')" +NEWTAR="${TARDIR}-filtered.tar.zst" + +SAVEDIR="${PWD}" +XDIR="$(mktemp -d)" +trap "rm -rf '${XDIR}'" INT TERM EXIT + +cd "${XDIR}" +curl -L -O "${SOURCE0}" +echo "Extracting ${TARNAME}…" 1>&2 +tar -xzf "${TARNAME}" +MTIME="$(stat -c '%Y' "${TARDIR}")" +rm -rvf "${TARDIR}/tests/resources" +echo "Re-compressing as ${NEWTAR}…" 1>&2 +# https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html +# We reset all mtimes to that of the top-level extracted directory; since git +# archives don’t have meaningful per-file mtimes, nothing useful is lost. +TZ=UTC LC_ALL=C tar \ + --create \ + --sort=name \ + --format=posix \ + --numeric-owner --owner=0 --group=0 \ + --mode=go+u,go-w \ + --pax-option='delete=atime,delete=ctime' \ + --clamp-mtime --mtime="@${MTIME}" \ + "${TARDIR}/" | + zstdmt --ultra -22 > "${NEWTAR}" +touch -d @"${MTIME}" "${NEWTAR}" + +cd "${SAVEDIR}" +mv -v "${XDIR}/${NEWTAR}" . diff --git a/python-OWSLib.spec b/python-OWSLib.spec index c386c18..b079441 100644 --- a/python-OWSLib.spec +++ b/python-OWSLib.spec @@ -15,8 +15,23 @@ Summary: OGC Web Service utility library License: BSD-3-Clause URL: https://geopython.github.io/OWSLib -%global forgeurl https://github.com/geopython/OWSLib -Source: %{forgeurl}/archive/%{version}/OWSLib-%{version}.tar.gz +# A filtered source archive, obtained by (see Source1): +# +# ./get_source %%{version} +# +# is required because tests/resources/ contains XML data files that appear to +# have been pulled from various GIS databases, and the license terms for these +# files are unclear. +# +# The unfiltered base source URL would be: +# +# https://github.com/geopython/OWSLib/archive/%%{version}/OWSLib-%%{version}.tar.gz +# +# We *could* use the PyPI sdist, which does not contain tests/resources/, but +# it also does not contain any tests at all. We can still run some tests +# without the XML files, and we would like to do so. +Source0: OWSLib-%{version}-filtered.tar.zst +Source1: get_source BuildArch: noarch @@ -113,40 +128,42 @@ PYTHONPATH="${PWD}" %make_build -C docs latex \ # Otherwise, pytest finds the package twice in the Python path and complains. rm -rf owslib -# There is a convenient “online” mark for deselecting tests that require -# Internet access, but we still have to manually deselect doctests that try to -# make network requests. -k="${k-}${k+ and }not wms_geoserver_mass_gis.txt" -k="${k-}${k+ and }not wfs_MapServerWFSFeature.txt" -k="${k-}${k+ and }not wfs_MapServerWFSCapabilities.txt" -k="${k-}${k+ and }not wfs2_storedqueries.txt" -k="${k-}${k+ and }not wfs1_generic.txt" -k="${k-}${k+ and }not wcs_thredds.txt" +# These require test data files from tests/resources/, which we have removed: +ignore="${ignore-} --ignore-glob=tests/doctests/*.txt" +k="${k-}${k+ and }not test_gm03" +ignore="${ignore-} --ignore=tests/test_iso_parsing.py" +ignore="${ignore-} --ignore=tests/test_ows_interfaces.py" +ignore="${ignore-} --ignore=tests/test_owscontext_atomxml.py" +k="${k-}${k+ and }not test_decode_single_json" +k="${k-}${k+ and }not test_load_parse" +k="${k-}${k+ and }not test_decode_full_json" +k="${k-}${k+ and }not test_load_bulk" +ignore="${ignore-} --ignore=tests/test_remote_metadata.py" +k="${k-}${k+ and }not TestOffline" +ignore="${ignore-} --ignore=tests/test_wfs_generic.py" +ignore="${ignore-} --ignore=tests/test_wms_datageo_130.py" +ignore="${ignore-} --ignore=tests/test_wms_jpl_capabilities.py" +k="${k-}${k+ and }not test_wps_getOperationByName" +k="${k-}${k+ and }not test_wps_checkStatus" +k="${k-}${k+ and }not test_wps_process_representation" +k="${k-}${k+ and }not test_wps_process_properties" +k="${k-}${k+ and }not test_wps_literal_data_input_parsing_references" +k="${k-}${k+ and }not test_wps_response_with_lineage" +ignore="${ignore-} --ignore=tests/test_wps_describeprocess_bbox.py" +ignore="${ignore-} --ignore=tests/test_wps_describeprocess_ceda.py" +ignore="${ignore-} --ignore=tests/test_wps_describeprocess_emu_all.py" +ignore="${ignore-} --ignore=tests/test_wps_describeprocess_usgs.py" +ignore="${ignore-} --ignore=tests/test_wps_execute.py" +ignore="${ignore-} --ignore=tests/test_wps_execute_invalid_request.py" +ignore="${ignore-} --ignore=tests/test_wps_getcapabilities_52n.py" +ignore="${ignore-} --ignore=tests/test_wps_getcapabilities_ceda.py" +ignore="${ignore-} --ignore=tests/test_wps_getcapabilities_usgs.py" +ignore="${ignore-} --ignore-glob=tests/test_wps_request*.py" +ignore="${ignore-} --ignore-glob=tests/test_wps_response*.py" +# Not in 0.30.0: k="${k-}${k+ and }not test_wmts_example_informatievlaanderen" -# This is a trivial error where the representation of the expected TypeError -# has changed over time: -# Differences (unified diff with -expected +actual): -# @@ -1,3 +1,6 @@ -# Traceback (most recent call last): -# -... -# -TypeError: get_namespace() ... -# + File "/usr/lib64/python3.10/doctest.py", line 1346, in __run -# + exec(compile(example.source, filename, "single", -# + File "", line 1, in -# + ns.get_namespace() -# +TypeError: Namespaces.get_namespace() missing 1 required positional argument: 'key' -k="${k-}${k+ and }not namespaces.txt" - -# Unknown problem—check if it is fixed in a later version: -k="${k-}${k+ and } not (TestOffline and test_wfs_110_remotemd_parse_all)" -k="${k-}${k+ and } not (TestOffline and test_wfs_110_remotemd_parse_single)" -k="${k-}${k+ and } not (TestOffline and test_wfs_200_remotemd_parse_all)" -k="${k-}${k+ and } not (TestOffline and test_wfs_200_remotemd_parse_single)" -k="${k-}${k+ and } not (TestOffline and test_wms_130_remotemd_parse_all)" -k="${k-}${k+ and } not (TestOffline and test_wms_130_remotemd_parse_single)" - -%pytest -m 'not online' -k "${k-}" +%pytest -m 'not online' -k "${k-}" ${ignore-} -v -rs %files -n python3-OWSLib -f %{pyproject_files} diff --git a/sources b/sources index 6ddf3e6..ab670fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (OWSLib-0.28.1.tar.gz) = bd62a5e371e64e0e256cc83d2f044294c20965f6b107b0dd9074ac752971620f01af4c7fc9a82e43dc81e71a6a36696b75403012841c28925b017d9c47b2d4a5 +SHA512 (OWSLib-0.28.1-filtered.tar.zst) = b32734fb953612e617ab28387ae55c349b8ce119454c712e7c425322d952895031c0fb15f6614a17bb34e7588cd5f90ccfcb2cc1eba1a719c569d3ae4eb44684