Compare commits

..

4 commits

Author SHA1 Message Date
Benjamin A. Beasley
e4958a2ac7 Merge branch 'f41' into f39 2024-11-13 10:36:45 -05:00
Benjamin A. Beasley
886a9deb80 Update to 0.30.0 (close RHBZ#2268924) 2024-03-20 16:06:05 -04:00
Benjamin A. Beasley
d7349ed184 Update Summary from upstream 2024-03-20 16:06:04 -04:00
Benjamin A. Beasley
7bc19d3676 Add an rpmlintrc file
[skip changelog]
2024-03-20 16:06:04 -04:00
4 changed files with 84 additions and 42 deletions

5
.gitignore vendored
View file

@ -37,8 +37,3 @@
/OWSLib-0.30.0.tar.gz /OWSLib-0.30.0.tar.gz
/OWSLib-0.30.0-filtered.tar.zst /OWSLib-0.30.0-filtered.tar.zst
/OWSLib-0.31.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

View file

@ -1,7 +1,2 @@
# The source cannot be a URL because we have to filter out files before # All documentation is in the -doc subpackage.
# uploading to the lookaside cache. addFilter(r" no-documentation$")
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")

View file

@ -1,5 +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.
# EPEL10 does not (yet) have pandoc.
%bcond doc_pdf %{undefined el10}
Name: python-OWSLib Name: python-OWSLib
Version: 0.35.0 Version: 0.31.0
Release: %autorelease Release: %autorelease
Summary: OGC Web Service utility library Summary: OGC Web Service utility library
@ -23,29 +30,16 @@ URL: https://geopython.github.io/OWSLib
Source0: OWSLib-%{version}-filtered.tar.zst Source0: OWSLib-%{version}-filtered.tar.zst
Source1: get_source Source1: get_source
BuildSystem: pyproject
BuildOption(install): -l owslib
BuildArch: noarch BuildArch: noarch
# Tests; dependencies are in requirements-dev.txt. BuildRequires: python3-devel
BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist pytest_httpserver} %if %{with doc_pdf}
BuildRequires: %{py3_dist Pillow} BuildRequires: make
# We dont have pytest-socket packaged, and we can get by without it. BuildRequires: python3-sphinx-latex
# - pytest-socket BuildRequires: latexmk
# We dont use tox to run the tests. It would run "python3 setup.py develop", BuildRequires: pandoc
# which is unwanted. %endif
# - 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
%global common_description %{expand: %global common_description %{expand:
OWSLib is a Python package for client programming with Open Geospatial OWSLib is a Python package for client programming with Open Geospatial
@ -65,19 +59,68 @@ Summary: %{summary}
%py_provides python3-owslib %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} %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 # 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|twine|coverage|coveralls)\b/d' \
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/source/conf.py
%check -a %generate_buildrequires
%{pyproject_buildrequires \
%{?with_doc_pdf:docs/requirements.txt} \
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 LATEXMKOPTS='-quiet'
%endif
%install
%pyproject_install
%pyproject_save_files -l owslib
%check
# Otherwise, pytest finds the package twice in the Python path and complains. # Otherwise, pytest finds the package twice in the Python path and complains.
rm -rf owslib rm -rf owslib
@ -136,7 +179,16 @@ k="${k-}${k+ and }not test_md_distribution"
%files -n python3-OWSLib -f %{pyproject_files} %files -n python3-OWSLib -f %{pyproject_files}
%files doc
%license LICENSE
%doc AUTHORS.rst
%doc README.md %doc README.md
%doc examples/
%if %{with doc_pdf}
%doc docs/build/latex/OWSLib.pdf
%endif
%changelog %changelog

View file

@ -1 +1 @@
SHA512 (OWSLib-0.35.0-filtered.tar.zst) = be1eb52fa09049b720c1ebd476363e01c6442c9905c9adf0d35ccc11f39b228b9f3e64ed882a7c04987f2f38f9c8500a61aeef61e48a41602098ff22df0ed526 SHA512 (OWSLib-0.31.0-filtered.tar.zst) = e59d85d3c397292254a769dd04ddc65f3aab3eb2ed53581ba621dc91ae8a02b216dcbcd6bbad0b4d8395a2927bed7e5e27aee9f6d7f1bbed827a72cc9def6bfd