Update to 0.33.0 (close RHBZ#2353440)
- Drop the -doc subpackage (PDF docs and examples) for simplicity
This commit is contained in:
parent
7d9cdc5c0c
commit
432bc43af7
3 changed files with 36 additions and 62 deletions
|
|
@ -1,12 +1,8 @@
|
|||
# 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}
|
||||
# Not yet in EPEL10: https://bugzilla.redhat.com/show_bug.cgi?id=2324280
|
||||
%bcond pytest_httpserver %{undefined el10}
|
||||
|
||||
Name: python-OWSLib
|
||||
Version: 0.32.0
|
||||
Version: 0.33.0
|
||||
Release: %autorelease
|
||||
Summary: OGC Web Service utility library
|
||||
|
||||
|
|
@ -34,12 +30,26 @@ BuildArch: noarch
|
|||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%if %{with doc_pdf}
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-sphinx-latex
|
||||
BuildRequires: latexmk
|
||||
BuildRequires: pandoc
|
||||
# Tests; dependencies are in requirements-dev.txt.
|
||||
BuildRequires: %{py3_dist pytest}
|
||||
%if %{with pytest_httpserver}
|
||||
BuildRequires: %{py3_dist pytest_httpserver}
|
||||
%endif
|
||||
BuildRequires: %{py3_dist Pillow}
|
||||
# We don’t have pytest-socket packaged, and we can get by without it.
|
||||
# - pytest-socket
|
||||
# We don’t 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
|
||||
|
||||
%global common_description %{expand:
|
||||
OWSLib is a Python package for client programming with Open Geospatial
|
||||
|
|
@ -59,61 +69,29 @@ 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/[-]-cov[^[:blank:]]*[[:blank:]][^[[:blank:]]+//g' tox.ini
|
||||
# Don’t generate linting/coverage dependencies.
|
||||
#
|
||||
# We don’t have python3dist(pandoc) packaged, and besides, we don’t actually
|
||||
# need python3dist(pandoc)—only the pandoc command-line tool, which we have
|
||||
# manually BR’d.
|
||||
#
|
||||
# Don’t 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 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
|
||||
|
||||
# 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
|
||||
sed -r -i 's/^([[:blank:]]*)(--cov\b)/\1# \2/' tox.ini
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%{pyproject_buildrequires \
|
||||
%{?with_doc_pdf:docs/requirements.txt} \
|
||||
requirements-dev-filtered.txt}
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%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
|
||||
|
|
@ -178,20 +156,15 @@ k="${k-}${k+ and }not test_md_reference_system"
|
|||
k="${k-}${k+ and }not test_service2"
|
||||
k="${k-}${k+ and }not test_md_distribution"
|
||||
|
||||
%if %{without pytest_httpserver}
|
||||
ignore="${ignore-} --ignore=tests/test_csw_inspire.py"
|
||||
%endif
|
||||
|
||||
%pytest -m 'not online' -k "${k-}" ${ignore-} -v -rs
|
||||
|
||||
|
||||
%files -n python3-OWSLib -f %{pyproject_files}
|
||||
|
||||
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc AUTHORS.rst
|
||||
%doc README.md
|
||||
%doc examples/
|
||||
%if %{with doc_pdf}
|
||||
%doc docs/build/latex/OWSLib.pdf
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue