Blame python-pydata-sphinx-theme.spec

1395823
# Documentation can no longer be built in Fedora due to missing python modules:
1395823
# ablog, myst-nb, sphinx-togglebutton
1395823
# This also means that doctests cannot be run.
1395823
%bcond_with docs
1395823
b62c0ee
Name:           python-pydata-sphinx-theme
eec5405
Version:        0.15.2
af4d4d5
Release:        4%{?dist}
7ef1d9d
Summary:        Bootstrap-based Sphinx theme from the PyData community
7ef1d9d
3720901
# This project is BSD-3-Clause.
3720901
# The bundled bootstrap JavaScript library is MIT.
af4d4d5
License:        BSD-3-Clause AND MIT
b62c0ee
BuildArch:      noarch
1395823
URL:            https://pydata-sphinx-theme.readthedocs.io/
1395823
Source0:        https://github.com/pydata/pydata-sphinx-theme/archive/v%{version}/pydata-sphinx-theme-%{version}.tar.gz
b62c0ee
# Source1 and Source2 created with ./prepare_vendor.sh
b62c0ee
Source1:        pydata-sphinx-theme-%{version}-vendor.tar.xz
b62c0ee
Source2:        pydata-sphinx-theme-%{version}-vendor-licenses.txt
1395823
%if %{with docs}
1395823
# Generating image files requires network access.  Instead, we scrape these from
1395823
# https://pydata-sphinx-theme.readthedocs.io/en/latest/_images.  See
1395823
# docs/_static/gallery.yaml for a list of images to download.
1395823
Source3:        pydata-gallery.tar.xz
1395823
%endif
7ef1d9d
# Fedora-only patch: unbundle the fontawesome fonts
7ef1d9d
Patch0:         %{name}-fontawesome.patch
7ef1d9d
1395823
BuildRequires:  fontawesome-fonts-all
b62c0ee
BuildRequires:  gcc-c++
7ef1d9d
BuildRequires:  make
b62c0ee
BuildRequires:  nodejs-devel
1395823
BuildRequires:  nodejs-npm
7ef1d9d
BuildRequires:  python3-devel
1395823
BuildRequires:  %{py3_dist pytest-regressions}
d1c6d89
BuildRequires:  yarnpkg
b62c0ee
d1c6d89
Provides:       bundled(js-bootstrap) = 5.3.2
1395823
1395823
%if %{without docs}
1395823
Obsoletes:      %{name}-doc < 0.13.0-1
1395823
%endif
7ef1d9d
7ef1d9d
%global _description %{expand:
7ef1d9d
This package contains a Sphinx extension for creating document components
7ef1d9d
optimized for HTML+CSS.
7ef1d9d
7ef1d9d
- The panels directive creates panels of content in a grid layout,
7ef1d9d
  utilizing both the Bootstrap 4 grid system, and cards layout.
7ef1d9d
7ef1d9d
- The link-button directive creates a clickable button, linking to a URL
7ef1d9d
  or reference, and can also be used to make an entire panel clickable.
7ef1d9d
7ef1d9d
- The dropdown directive creates content that can be toggled.
7ef1d9d
7ef1d9d
- The tabbed directive creates tabbed content.
7ef1d9d
1395823
- opticon and fa (fontawesome) roles allow for inline icons to be added.
1395823
1395823
See https://pydata-sphinx-theme.readthedocs.io/ for documentation.}
7ef1d9d
7ef1d9d
%description %_description
7ef1d9d
b62c0ee
%package     -n python3-pydata-sphinx-theme
b62c0ee
Summary:        Bootstrap-based Sphinx theme from the PyData community
1395823
Requires:       fontawesome-fonts-all
7ef1d9d
b62c0ee
%description -n python3-pydata-sphinx-theme %_description
7ef1d9d
1395823
%if %{with docs}
2fe4936
%package        doc
3720901
Summary:        Documentation for pydata-sphinx-theme
2fe4936
2fe4936
%description    doc
3720901
Documentation for pydata-sphinx-theme.
1395823
%endif
2fe4936
7ef1d9d
%prep
b62c0ee
%autosetup -n pydata-sphinx-theme-%{version} -p1 -a1
b62c0ee
cp -p %{SOURCE2} .
b62c0ee
1395823
%if %{with docs}
1395823
%setup -n pydata-sphinx-theme-%{version} -q -T -D -a 3
1395823
1395823
# Point to the local switcher instead of the inaccessible one on the web
1395823
sed -i 's,https://pydata-sphinx-theme\.readthedocs\.io/en/latest/,,' docs/conf.py
1395823
%endif
1395823
b62c0ee
# Substitute the installed nodejs version for the requested version
b62c0ee
sed -i 's,^\(node-version = \)".*",\1"%{nodejs_version}",' pyproject.toml
7ef1d9d
1395823
%generate_buildrequires
61cb0a8
%pyproject_buildrequires -x test%{?with_docs:,doc}
7d15a00
7ef1d9d
%build
b62c0ee
export YARN_CACHE_FOLDER="$PWD/.package-cache"
b62c0ee
yarn install --offline
1395823
nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv
b62c0ee
7ef1d9d
%pyproject_wheel
7ef1d9d
7ef1d9d
%install
7ef1d9d
%pyproject_install
b62c0ee
%pyproject_save_files pydata_sphinx_theme
b62c0ee
sed -i '/\.gitignore/d' %{pyproject_files}
b62c0ee
rm %{buildroot}%{python3_sitelib}/pydata_sphinx_theme/theme/pydata_sphinx_theme/static/.gitignore
7ef1d9d
1395823
%if %{with docs}
2fe4936
# We need an installed tree before documentation building works properly
2fe4936
cd docs
1395823
%{py3_test_envvars} sphinx-build -a . _build
2fe4936
rm _build/.buildinfo
2fe4936
cd -
1395823
%endif
2fe4936
7ef1d9d
%check
0049366
# Translation does not work correctly in an uninstalled tree
1395823
%pytest -k 'not test_translations'
7ef1d9d
b62c0ee
%files -n python3-pydata-sphinx-theme -f %{pyproject_files}
7ef1d9d
%doc README.md
7ef1d9d
1395823
%if %{with docs}
2fe4936
%files doc
2fe4936
%doc docs/_build/*
2fe4936
%license LICENSE
1395823
%endif
2fe4936
7ef1d9d
%changelog
af4d4d5
* Tue Feb 20 2024 Jerry James <loganjerry@gmail.com> - 0.15.2-4
af4d4d5
- Fix the SPDX expression
af4d4d5
f42be5d
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-3
f42be5d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
f42be5d
6051c7f
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-2
6051c7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
6051c7f
eec5405
* Thu Jan 18 2024 Jerry James <loganjerry@gmail.com> - 0.15.2-1
eec5405
- Version 0.15.2
eec5405
61cb0a8
* Tue Jan  9 2024 Jerry James <loganjerry@gmail.com> - 0.15.1-1
61cb0a8
- Version 0.15.1
61cb0a8
0049366
* Mon Nov 27 2023 Jerry James <loganjerry@gmail.com> - 0.14.4-1
0049366
- Version 0.14.4
0049366
c4791de
* Mon Oct 30 2023 Jerry James <loganjerry@gmail.com> - 0.14.3-1
c4791de
- Version 0.14.3
c4791de
e5cd938
* Wed Oct 25 2023 Jerry James <loganjerry@gmail.com> - 0.14.2-1
e5cd938
- Version 0.14.2
e5cd938
9ee097a
* Wed Sep 20 2023 Jerry James <loganjerry@gmail.com> - 0.14.1-1
9ee097a
- Version 0.14.1
9ee097a
d1c6d89
* Fri Sep 15 2023 Jerry James <loganjerry@gmail.com> - 0.14.0-1
d1c6d89
- Version 0.14.0
d1c6d89
cc2a7a0
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.3-3
cc2a7a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
cc2a7a0
570c948
* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 0.13.3-2
570c948
- Rebuilt for Python 3.12
570c948
1395823
* Thu Mar 30 2023 Jerry James <loganjerry@gmail.com> - 0.13.3-1
1395823
- Version 0.13.3
1395823
- Stop building documentation due to missing dependencies
1395823
- Dynamically generate python BuildRequires
1395823
- The node header tarball is no longer needed
1395823
3e37114
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
3e37114
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
3e37114
3720901
* Fri Jan  6 2023 Jerry James <loganjerry@gmail.com> - 0.9.0-2
3720901
- Fix unexpanded macros in the doc subpackage
3720901
- Convert License tag to SPDX
3720901
ed13910
* Tue Aug  2 2022 Jerry James <loganjerry@gmail.com> - 0.9.0-1
ed13910
- Version 0.9.0 (fixes rhbz#2105307)
ed13910
c618240
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-4
c618240
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
c618240
72ce8a7
* Tue Jun 21 2022 Python Maint <python-maint@redhat.com> - 0.8.1-3
72ce8a7
- Rebuilt for Python 3.11
72ce8a7
2fe4936
* Fri May 13 2022 Jerry James <loganjerry@gmail.com> - 0.8.1-2
2fe4936
- Bring back the doc subpackage
2fe4936
b62c0ee
* Tue Apr 12 2022 Jerry James <loganjerry@gmail.com> - 0.8.1-1
b62c0ee
- Version 0.8.1
b62c0ee
- Drop the doc subpackage due to missing dependencies
b62c0ee
- Use yarn to install vendored JavaScript
b62c0ee
993eba0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-2
993eba0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
993eba0
c62b2fb
* Thu Nov 11 2021 Jerry James <loganjerry@gmail.com> - 0.7.2-1
c62b2fb
- Version 0.7.2
c62b2fb
4377fed
* Sat Oct  2 2021 Jerry James <loganjerry@gmail.com> - 0.7.1-1
4377fed
- Version 0.7.1
4377fed
- Drop upstreamed -sphinx4.1 and -docutils patches
4377fed
e58f8b9
* Wed Sep 22 2021 Jerry James <loganjerry@gmail.com> - 0.6.3-2
e58f8b9
- Add upstream -docutils patch to fix FTI (bz 2006934)
e58f8b9
7ef1d9d
* Tue Jul 13 2021 Jerry James <loganjerry@gmail.com> - 0.6.3-1
7ef1d9d
- Initial RPM