Compare commits

..

13 commits

Author SHA1 Message Date
Benjamin A. Beasley
9b833bff57 Omit test data files with unclear license status 2024-11-13 11:14:59 -05:00
Benjamin A. Beasley
fd2014ec9e Update Summary from upstream 2024-11-13 11:11:44 -05:00
Benjamin A. Beasley
957b30f912 Add an rpmlintrc file
[skip changelog]
2024-11-13 11:11:40 -05:00
Benjamin A. Beasley
e4bfed3048 Assert that %pyproject_files contains a license file 2024-11-13 11:11:16 -05:00
Benjamin A. Beasley
50c359be7f Use new (rpm 4.17.1+) bcond style 2024-11-13 11:11:09 -05:00
Benjamin A. Beasley
58daffda35 Shorten a long line by using a macro
[skip changelog]
2024-11-13 11:10:02 -05:00
Benjamin A. Beasley
50d60485c8 Do not number the sole Source
[skip changelog]
2024-11-13 11:09:48 -05:00
Benjamin A. Beasley
4f7710c077 Don’t assume %_smp_mflags is -j%_smp_build_ncpus 2024-11-13 11:09:38 -05:00
Benjamin A. Beasley
efa3eb4f30 Move some text doc files to the -doc subpackage 2024-11-13 11:09:35 -05:00
Benjamin A. Beasley
f35d034de6 Update to 0.28.1 (close RHBZ#2173195) 2023-02-25 09:36:50 -05:00
Benjamin A. Beasley
08da30ae5c Update to 0.28.0 (close RHBZ#2171409) 2023-02-20 13:05:20 -05:00
Benjamin A. Beasley
90ff95b3fa Drop default argument -r for pyproject_buildrequires 2023-02-20 13:05:18 -05:00
Benjamin A. Beasley
cc700e9b9b Initial package for EPEL9
- Disabled PDF documentation due to missing dependencies
2022-11-16 08:07:16 -05:00
4 changed files with 93 additions and 68 deletions

13
.gitignore vendored
View file

@ -30,15 +30,4 @@
/OWSLib-0.27.2.tar.gz
/OWSLib-0.28.0.tar.gz
/OWSLib-0.28.1.tar.gz
/OWSLib-0.29.0.tar.gz
/OWSLib-0.29.1.tar.gz
/OWSLib-0.29.2.tar.gz
/OWSLib-0.29.3.tar.gz
/OWSLib-0.30.0.tar.gz
/OWSLib-0.30.0-filtered.tar.zst
/OWSLib-0.31.0-filtered.tar.zst
/OWSLib-0.32.0-filtered.tar.zst
/OWSLib-0.33.0-filtered.tar.zst
/OWSLib-0.34.0-filtered.tar.zst
/OWSLib-0.34.1-filtered.tar.zst
/OWSLib-0.35.0-filtered.tar.zst
/OWSLib-0.28.1-filtered.tar.zst

View file

@ -1,7 +1,2 @@
# The source cannot be a URL because we have to filter out files before
# uploading to the lookaside cache.
addFilter(r" invalid-url .* OWSLib-.*-filtered\.tar\.zst")
# There is nothing wrong with .tar.zst, but rpmlint does not know that.
addFilter(r" inconsistent-file-extension .*\.tar\.zst")
# Removed without replacement in Fedora 42
addFilter(r" obsolete-not-provided python-OWSLIB-doc")
# All documentation is in the -doc subpackage.
addFilter(r" no-documentation$")

View file

@ -1,5 +1,15 @@
# 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. However, EPEL9 is
# currently missing some documentation dependencies:
# - python-ipykernel
# - python-nbconvert
# - python-nbsphinx
%bcond doc_pdf 0
Name: python-OWSLib
Version: 0.35.0
Version: 0.28.1
Release: %autorelease
Summary: OGC Web Service utility library
@ -23,29 +33,16 @@ URL: https://geopython.github.io/OWSLib
Source0: OWSLib-%{version}-filtered.tar.zst
Source1: get_source
BuildSystem: pyproject
BuildOption(install): -l owslib
BuildArch: noarch
# Tests; dependencies are in requirements-dev.txt.
BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist pytest_httpserver}
BuildRequires: %{py3_dist Pillow}
# We dont have pytest-socket packaged, and we can get by without it.
# - pytest-socket
# We dont use tox to run the tests. It would run "python3 setup.py develop",
# which is unwanted.
# - tox
# Unwanted linting/coverage dependencies:
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
# - coverage
# - coveralls
# - flake8
# - pytest-cov
# These are just for the maintainer to upload to PyPI.
# - build
# - twine
BuildRequires: python3-devel
%if %{with doc_pdf}
BuildRequires: make
BuildRequires: python3-sphinx-latex
BuildRequires: latexmk
BuildRequires: pandoc
%endif
%global common_description %{expand:
OWSLib is a Python package for client programming with Open Geospatial
@ -65,19 +62,69 @@ Summary: %{summary}
%py_provides python3-owslib
# 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
%description -n python3-OWSLib %{common_description}
%prep -a
%package doc
Summary: Documentation and examples for OWSLib
%description doc
%{summary}.
%prep
%autosetup -n OWSLib-%{version}
# Dont analyze/report test coverage
sed -r -i 's/^([[:blank:]]*)(--cov\b)/\1# \2/' tox.ini
sed -r -i 's/[-]-cov[^[:blank:]]*[[:blank:]][^[[:blank:]]+//g' tox.ini
# Dont generate linting/coverage dependencies.
#
# We dont have python3dist(pandoc) packaged, and besides, we dont actually
# need python3dist(pandoc)—only the pandoc command-line tool, which we have
# manually BRd.
#
# Dont generate twine dependency, which is just for the upstream maintainer
# uploading to PyPI.
sed -r -e '/^(flake8|pytest-cov|pandoc|coverage|coveralls|twine)\b/d' \
%if %{without doc_pdf}
-e '/^(ipykernel|nbconvert|.*sphinx)/d' \
%endif
requirements-dev.txt | tee requirements-dev-filtered.txt
# We dont 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
# Because at least one notebook requires Internet access, we must continue past
# notebook errors when building documentation.
echo 'nbsphinx_allow_errors = True' >> docs/conf.py
%check -a
%generate_buildrequires
%pyproject_buildrequires requirements-dev-filtered.txt
%build
%pyproject_wheel
%if %{with doc_pdf}
PYTHONPATH="${PWD}" %make_build -C docs latex \
SPHINXOPTS='-j%{?_smp_build_ncpus}'
%make_build -C docs/build/latex/en LATEXMKOPTS='-quiet'
%endif
%install
%pyproject_install
%pyproject_save_files -l owslib
%check
# Otherwise, pytest finds the package twice in the Python path and complains.
rm -rf owslib
@ -113,30 +160,24 @@ 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"
k="${k-}${k+ and }not test_metadata"
k="${k-}${k+ and }not test_responsibility"
k="${k-}${k+ and }not test_distributor"
k="${k-}${k+ and }not test_online_distribution"
k="${k-}${k+ and }not test_identification"
k="${k-}${k+ and }not test_identification_contact"
k="${k-}${k+ and }not test_identification_date"
k="${k-}${k+ and }not test_identification_extent"
k="${k-}${k+ and }not test_identification_keywords"
k="${k-}${k+ and }not test_get_all_contacts"
k="${k-}${k+ and }not test_aus"
k="${k-}${k+ and }not test_service"
k="${k-}${k+ and }not test_md_featurecataloguedesc"
k="${k-}${k+ and }not test_md_imagedescription"
k="${k-}${k+ and }not test_dq_dataquality"
k="${k-}${k+ and }not test_md_reference_system"
k="${k-}${k+ and }not test_service2"
k="${k-}${k+ and }not test_md_distribution"
# Not in 0.30.0:
k="${k-}${k+ and }not test_wmts_example_informatievlaanderen"
%pytest -m 'not online' -k "${k-}" ${ignore-} -v -rs
%files -n python3-OWSLib -f %{pyproject_files}
%doc README.md
%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
%endif
%changelog

View file

@ -1 +1 @@
SHA512 (OWSLib-0.35.0-filtered.tar.zst) = be1eb52fa09049b720c1ebd476363e01c6442c9905c9adf0d35ccc11f39b228b9f3e64ed882a7c04987f2f38f9c8500a61aeef61e48a41602098ff22df0ed526
SHA512 (OWSLib-0.28.1-filtered.tar.zst) = b32734fb953612e617ab28387ae55c349b8ce119454c712e7c425322d952895031c0fb15f6614a17bb34e7588cd5f90ccfcb2cc1eba1a719c569d3ae4eb44684