Remove unused/disabled docs conditional

Sphinx-generated HTML documentation is unsuitable for packaging; see
https://bugzilla.redhat.com/show_bug.cgi?id=2006555 and linked mailing
list threads.

It might be possible to generate a PDF with Sphinx; if so, the best way
would be to use the GitHub source archive if necessary to get
requirements_docs.txt and use it to generate BuildRequires. However, it
seems unlikely that this will be worthwhile.
This commit is contained in:
Benjamin A. Beasley
2023-10-29 21:55:40 -04:00
parent 2b6a46e954
commit e9b556312f
-36
View File
@@ -1,5 +1,4 @@
%global pypi_name Pint
%bcond_with docs
Name: python-pint
Version: 0.17
@@ -38,27 +37,6 @@ to different units.
It is distributed with a comprehensive list of physical units, prefixes
and constants.
%if %{with docs}
%package -n python3-pint-doc
Summary: Documentation for the pint module
%{?python_provide:%python_provide python3-pint-doc}
BuildRequires: pandoc
BuildRequires: python3-graphviz
BuildRequires: python3-ipykernel
BuildRequires: python3-jupyter-client
BuildRequires: python3-matplotlib
BuildRequires: python3-nbsphinx
BuildRequires: python3-pandas
BuildRequires: python3-dask
BuildRequires: python3-pygments
BuildRequires: python3-sphinx
BuildRequires: python3-xarray
%description -n python3-pint-doc
Documentation for the pint module
%endif
%prep
%setup -q -n %{pypi_name}-%{version}
@@ -87,14 +65,6 @@ sed -i '/@helpers.requires_numpy_at_least("1.16")/d' pint/testsuite/test_quantit
%build
%pyproject_wheel
%if %{with docs}
export PYTHONPATH="$( pwd ):$PYTHONPATH"
sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif
%install
%pyproject_install
@@ -107,11 +77,5 @@ rm -rf html/.{doctrees,buildinfo}
%{python3_sitelib}/pint
%{python3_sitelib}/Pint-%{version}.*
%if %{with docs}
%files -n python3-pint-doc
%doc html
%license docs/_themes/LICENSE
%endif
%changelog
%autochangelog