Compare commits

...
Sign in to create a new pull request.

21 commits

Author SHA1 Message Date
Jerry James
fd83d2ad6e Version 0.21.0 2026-08-25 19:07:24 -06:00
Jerry James
629f036b47 Remove the yarnpkg dependency 2026-07-28 19:14:10 -06:00
Jerry James
c6c3c33fb9 Yet another attempt at unbundling the fonts
- Thanks to Corentin Noël for this approach
2026-07-28 10:53:47 -06:00
Fedora Release Engineering
19a29bfb70 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 21:01:51 +00:00
Jerry James
872c3f0189 Correct paths to FontAwesome fonts 2026-07-14 16:57:07 -06:00
Jerry James
c5bda8d06b Version 0.20.0
- Work harder to unbundle the FontAwesome fonts
2026-07-10 14:48:01 -06:00
Jerry James
a34cf31b79 Version 0.19.0 2026-06-15 11:59:19 -06:00
Python Maint
9c682e85b6 Rebuilt for Python 3.15 2026-06-04 22:10:04 +02:00
Jerry James
dcc6b4d28f Update FontAwesome from 6.x to 7.x 2026-05-27 11:35:57 -06:00
Jerry James
583b2125b5 Version 0.18.0 2026-05-20 09:36:59 -06:00
Jerry James
45f86b08f0 Version 0.17.1
- Do not run coverage tools in an RPM build
2026-04-21 08:27:21 -06:00
Jerry James
c0b6578fd9 Version 0.17.0
- Drop upstreamed pygments 2.19 patch
2026-04-03 12:30:55 -06:00
Jerry James
5e951a190b Adapt to nodejs changes in Rawhide 2026-01-29 11:01:57 -07:00
Fedora Release Engineering
4a8ba3a0e2 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 08:59:34 +00:00
Jerry James
4d6a96274c Adapt to removal of %{nodejs_version}
- Update the nodejs packages
2025-12-09 16:38:38 -07:00
Jerry James
5d9e552654 Do not run code coverage tools 2025-11-03 17:06:06 -07:00
Python Maint
295e69321d Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:04:20 +02:00
Python Maint
ce90274552 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 14:28:43 +02:00
Fedora Release Engineering
31062250cc Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 09:34:23 +00:00
Jerry James
0fe2a8140a Update bundled bootstrap to version 5.3.7
- Use the pyproject declarative buildsystem
2025-07-18 20:54:18 -06:00
Python Maint
82e0d2bd04 Rebuilt for Python 3.14 2025-06-03 23:35:16 +02:00
7 changed files with 82 additions and 392 deletions

View file

@ -1,311 +0,0 @@
From e1f763310e99d4c048d86c76b61073f3822aa981 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 6 Jan 2025 17:40:47 +0000
Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate hooks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
updates:
- [github.com/pycontribs/mirrors-prettier: v3.3.3 → v3.4.2](https://github.com/pycontribs/mirrors-prettier/compare/v3.3.3...v3.4.2)
- [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.1...v0.8.6)
- [github.com/asottile/pyupgrade: v3.19.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.19.0...v3.19.1)
- [github.com/Riverside-Healthcare/djLint: v1.36.3 → v1.36.4](https://github.com/Riverside-Healthcare/djLint/compare/v1.36.3...v1.36.4)
- [github.com/thibaudcolas/pre-commit-stylelint: v16.11.0 → v16.12.0](https://github.com/thibaudcolas/pre-commit-stylelint/compare/v16.11.0...v16.12.0)
---
.pre-commit-config.yaml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0d7c67c84..209a6d3e2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -13,7 +13,7 @@ default_language_version:
repos:
- repo: "https://github.com/pycontribs/mirrors-prettier"
- rev: v3.3.3
+ rev: v3.4.2
hooks:
- id: prettier
# Exclude the HTML, since it doesn't understand Jinja2
@@ -22,20 +22,20 @@ repos:
exclude: .+\.html|webpack\.config\.js|tests/test_a11y/
- repo: "https://github.com/astral-sh/ruff-pre-commit"
- rev: "v0.8.1"
+ rev: "v0.8.6"
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format
- repo: "https://github.com/asottile/pyupgrade"
- rev: v3.19.0
+ rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: "https://github.com/Riverside-Healthcare/djLint"
- rev: v1.36.3
+ rev: v1.36.4
hooks:
- id: djlint-jinja
types_or: ["html"]
@@ -56,7 +56,7 @@ repos:
- id: remove-metadata
- repo: "https://github.com/thibaudcolas/pre-commit-stylelint"
- rev: v16.11.0
+ rev: v16.12.0
hooks:
- id: stylelint
# automatically fix .scss files where possible
From 3e5aa9b4137445b288d6b287b36c8785c8c861b9 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 6 Jan 2025 17:41:49 +0000
Subject: [PATCH 2/6] [pre-commit.ci] Automatic linting and formatting fixes
---
.../styles/abstracts/_accessibility.scss | 6 +++--
.../assets/styles/variables/_color.scss | 24 +++++++------------
.../assets/styles/variables/_fonts.scss | 6 ++---
3 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/src/pydata_sphinx_theme/assets/styles/abstracts/_accessibility.scss b/src/pydata_sphinx_theme/assets/styles/abstracts/_accessibility.scss
index bc5cf74b7..53aa6aef0 100644
--- a/src/pydata_sphinx_theme/assets/styles/abstracts/_accessibility.scss
+++ b/src/pydata_sphinx_theme/assets/styles/abstracts/_accessibility.scss
@@ -70,8 +70,10 @@
$rgb-col: map.merge(
$rgb-col,
(
- $channel:
- math.pow(math.div((math.div($value, 255) + 0.055), 1.055), 2.4),
+ $channel: math.pow(
+ math.div((math.div($value, 255) + 0.055), 1.055),
+ 2.4
+ ),
)
);
}
diff --git a/src/pydata_sphinx_theme/assets/styles/variables/_color.scss b/src/pydata_sphinx_theme/assets/styles/variables/_color.scss
index 6553f0b24..5efe04989 100644
--- a/src/pydata_sphinx_theme/assets/styles/variables/_color.scss
+++ b/src/pydata_sphinx_theme/assets/styles/variables/_color.scss
@@ -26,8 +26,7 @@
/* Assign base colors for the PyData theme */
$color-palette: (
// Primary color
- "teal":
- (
+ "teal": (
"50": #f4fbfc,
"100": #e9f6f8,
"200": #d0ecf1,
@@ -40,8 +39,7 @@ $color-palette: (
"900": #021b1f,
),
// Secondary color
- "violet":
- (
+ "violet": (
"50": #f4eefb,
"100": #e0c7ff,
"200": #d5b4fd,
@@ -54,8 +52,7 @@ $color-palette: (
"900": #1e0e39,
),
// Neutrals
- "gray":
- (
+ "gray": (
"50": #f9f9fa,
"100": #f3f4f5,
"200": #e5e7ea,
@@ -68,8 +65,7 @@ $color-palette: (
"900": #14181e,
),
// Accent color
- "pink":
- (
+ "pink": (
"50": #fcf8fd,
"100": #fcf0fa,
"200": #f8dff5,
@@ -161,8 +157,7 @@ $pst-semantic-colors: (
"bg-dark": #002f17,
),
// This is based on the warning color
- "attention":
- (
+ "attention": (
"light": var(--pst-color-warning),
"bg-light": var(--pst-color-warning-bg),
"dark": var(--pst-color-warning),
@@ -229,15 +224,13 @@ $pst-semantic-colors: (
// DEPTH COLORS - you can see the elevation colours and shades
// in the Figma file https://www.figma.com/file/rUrrHGhUBBIAAjQ82x6pz9/PyData-Design-system---proposal-for-implementation-(2)?node-id=1492%3A922&t=sQeQZehkOzposYEg-1
// background: color of the canvas / the furthest back layer
- "background":
- (
+ "background": (
"light": #{map-deep-get($color-palette, "foundation", "white")},
"dark": #{map-deep-get($color-palette, "foundation", "black")},
),
// on-background: provides slight contrast against background
// (by use of shadows in light theme)
- "on-background":
- (
+ "on-background": (
"light": #{map-deep-get($color-palette, "foundation", "white")},
"dark": #{map-deep-get($color-palette, "gray", "800")},
),
@@ -246,8 +239,7 @@ $pst-semantic-colors: (
"dark": #{map-deep-get($color-palette, "gray", "700")},
),
// on_surface: object on top of surface object (without shadows)
- "on-surface":
- (
+ "on-surface": (
"light": #{map-deep-get($color-palette, "gray", "800")},
"dark": $foundation-light-gray,
),
diff --git a/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss b/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss
index 5b76b37ed..9a16122ea 100644
--- a/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss
+++ b/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss
@@ -33,9 +33,9 @@ html {
// Font family
// These are adapted from https://systemfontstack.com/ */
- --pst-font-family-base-system: -apple-system, "BlinkMacSystemFont", "Segoe UI",
- "Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
- "Segoe UI Symbol";
+ --pst-font-family-base-system: -apple-system, "BlinkMacSystemFont",
+ "Segoe UI", "Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji",
+ "Segoe UI Emoji", "Segoe UI Symbol";
--pst-font-family-monospace-system: "SFMono-Regular", "Menlo", "Consolas",
"Monaco", "Liberation Mono", "Lucida Console", monospace;
--pst-font-family-base: var(--pst-font-family-base-system);
From 402b8613ffbf5248471b94437592f05b98257592 Mon Sep 17 00:00:00 2001
From: Daniel McCloy <dan@mccloy.info>
Date: Wed, 8 Jan 2025 10:54:28 -0600
Subject: [PATCH 3/6] update caniuse-lite
---
package-lock.json | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index fef417f7c..5688e1834 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -709,9 +709,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001609",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001609.tgz",
- "integrity": "sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==",
+ "version": "1.0.30001690",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz",
+ "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==",
"dev": true,
"funding": [
{
@@ -726,7 +726,8 @@
"type": "github",
"url": "https://github.com/sponsors/ai"
}
- ]
+ ],
+ "license": "CC-BY-4.0"
},
"node_modules/chalk": {
"version": "4.1.2",
From f43024ded15bf55ea61e2bbaec8612d8b8631645 Mon Sep 17 00:00:00 2001
From: Daniel McCloy <dan@mccloy.info>
Date: Wed, 8 Jan 2025 11:01:22 -0600
Subject: [PATCH 4/6] improve test
---
tests/test_build.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_build.py b/tests/test_build.py
index 7a005fa4a..170a29a83 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -891,8 +891,8 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
# see if our warnings worked
if style_names[0].startswith("fake"):
assert len(warnings) == 2
- re.match(r"Color theme fake_foo.*tango", warnings[0])
- re.match(r"Color theme fake_bar.*monokai", warnings[1])
+ assert re.search(r"Highlighting style fake_foo.*tango", warnings[0])
+ assert re.search(r"Highlighting style fake_bar.*monokai", warnings[1])
else:
assert warnings == [""]
# test that the rendered HTML has highlighting spans
From 513729664b1c2c51c68d2c6086a9f05cea1976c1 Mon Sep 17 00:00:00 2001
From: Daniel McCloy <dan@mccloy.info>
Date: Wed, 8 Jan 2025 11:23:46 -0600
Subject: [PATCH 5/6] show info why test fails
---
tests/test_build.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tests/test_build.py b/tests/test_build.py
index 170a29a83..0d2f861f7 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -907,11 +907,9 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
lines = css_file.readlines()
assert lines[0].startswith('html[data-theme="light"]')
for mode, color in dict(zip(["light", "dark"], keyword_colors)).items():
- regexp = re.compile(
- r'html\[data-theme="' + mode + r'"\].*\.k .*color: ' + color
- )
- matches = [regexp.match(line) is not None for line in lines]
- assert sum(matches) == 1
+ regexp = re.compile(rf'html\[data-theme="{mode}"\].*\.k .*color:\s?{color}')
+ matches = [regexp.search(line) is not None for line in lines]
+ assert sum(matches) == 1, f"expected {mode}: {color}\n" + "\n".join(lines)
def test_deprecated_build_html(sphinx_build_factory, file_regression) -> None:
From d73887b5c73e805b28d8c7cd865c8f8e58a85745 Mon Sep 17 00:00:00 2001
From: Daniel McCloy <dan@mccloy.info>
Date: Wed, 8 Jan 2025 11:28:43 -0600
Subject: [PATCH 6/6] ignorecase
---
tests/test_build.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test_build.py b/tests/test_build.py
index 0d2f861f7..8444da330 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -907,7 +907,10 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
lines = css_file.readlines()
assert lines[0].startswith('html[data-theme="light"]')
for mode, color in dict(zip(["light", "dark"], keyword_colors)).items():
- regexp = re.compile(rf'html\[data-theme="{mode}"\].*\.k .*color:\s?{color}')
+ regexp = re.compile(
+ r'html\[data-theme="' + mode + r'"\].*\.k .*color:\s?' + color,
+ re.IGNORECASE,
+ )
matches = [regexp.search(line) is not None for line in lines]
assert sum(matches) == 1, f"expected {mode}: {color}\n" + "\n".join(lines)

View file

@ -18,7 +18,6 @@ echo "PATH: $PKG_PATH"
cleanup_tmpdir() { cleanup_tmpdir() {
popd 2>/dev/null popd 2>/dev/null
rm -rf $PKG_TMPDIR rm -rf $PKG_TMPDIR
rm -rf /tmp/yarn--*
} }
trap cleanup_tmpdir SIGINT trap cleanup_tmpdir SIGINT
@ -41,25 +40,26 @@ tar -xf $PKG_TARBALL -C $PKG_TMPDIR
cd $PKG_PATH cd $PKG_PATH
export YARN_CACHE_FOLDER="$PWD/.package-cache"
echo ">>>>>> Install npm modules" echo ">>>>>> Install npm modules"
yarn install --frozen-lockfile export npm_config_cache="$PWD/.package-cache"
rm package-lock.json
npm install
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: yarn install failed" echo "ERROR: npm install failed"
cleanup_and_exit 1 cleanup_and_exit 1
fi fi
echo ">>>>>> Package vendor files" echo ">>>>>> Package vendor files"
rm -f $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor.tar.xz rm -f $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor.tar.xz
XZ_OPT="-9e -T$(nproc)" tar cJf $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor.tar.xz .package-cache XZ_OPT="-9e -T$(nproc)" tar cJf $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor.tar.xz .package-cache node_modules
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
cleanup_and_exit 1 cleanup_and_exit 1
fi fi
yarn add license-checker npm add license-checker
yarn license-checker --summary | sed "s#$PKG_PATH#/tmp/#g" > $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor-licenses.txt node_modules/.bin/license-checker --summary | sed "s#$PKG_PATH#/tmp/#g" > $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor-licenses.txt
cd - cd -
rm -rf .package-cache node_modules rm -rf .package-cache node_modules /tmp/node-compile-cache
cleanup_and_exit 0 cleanup_and_exit 0

View file

@ -1,17 +0,0 @@
yarn run v1.22.22
$ /tmp/node_modules/.bin/license-checker --summary
├─ MIT: 267
├─ ISC: 32
├─ BSD-2-Clause: 15
├─ BSD-3-Clause: 7
├─ Apache-2.0: 5
├─ CC0-1.0: 2
├─ (CC-BY-4.0 AND OFL-1.1 AND MIT): 1
├─ MPL-2.0: 1
├─ CC-BY-4.0: 1
├─ (WTFPL OR MIT): 1
├─ CC-BY-3.0: 1
├─ (MIT AND CC-BY-3.0): 1
└─ 0BSD: 1
Done in 0.61s.

View file

@ -0,0 +1,17 @@
├─ MIT: 345
├─ ISC: 38
├─ BSD-2-Clause: 19
├─ BSD-3-Clause: 8
├─ Apache-2.0: 7
├─ CC0-1.0: 3
├─ MIT-0: 2
├─ (CC-BY-4.0 AND OFL-1.1 AND MIT): 1
├─ Python-2.0: 1
├─ MPL-2.0: 1
├─ CC-BY-4.0: 1
├─ (WTFPL OR MIT): 1
├─ BlueOak-1.0.0: 1
├─ CC-BY-3.0: 1
├─ (MIT AND CC-BY-3.0): 1
└─ 0BSD: 1

View file

@ -1,13 +1,13 @@
--- pydata-sphinx-theme-0.16.1/src/pydata_sphinx_theme/assets/scripts/fontawesome.js.orig 2024-12-17 03:38:01.000000000 -0700 --- pydata-sphinx-theme-0.18.0/src/pydata_sphinx_theme/assets/scripts/fontawesome.js.orig 2026-05-20 01:34:51.000000000 -0600
+++ pydata-sphinx-theme-0.16.1/src/pydata_sphinx_theme/assets/scripts/fontawesome.js 2024-12-17 09:09:44.347458128 -0700 +++ pydata-sphinx-theme-0.18.0/src/pydata_sphinx_theme/assets/scripts/fontawesome.js 2026-05-20 09:11:54.447608563 -0600
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// TODO: @trallard might end up moving this to the main JS file // TODO: @trallard might end up moving this to the main JS file
// Define the custom behavior of the page // Define the custom behavior of the page
-import "@fortawesome/fontawesome-free/js/all.min.js"; -import "@fortawesome/fontawesome-free/js/all.min.js";
+import "/usr/share/fontawesome/js/all.min.js"; +import "/usr/share/fontawesome/js/all.min.js";
--- pydata-sphinx-theme-0.16.1/src/pydata_sphinx_theme/assets/styles/pydata-sphinx-theme.scss.orig 2024-12-17 03:38:01.000000000 -0700 --- pydata-sphinx-theme-0.18.0/src/pydata_sphinx_theme/assets/styles/pydata-sphinx-theme.scss.orig 2026-05-20 01:34:51.000000000 -0600
+++ pydata-sphinx-theme-0.16.1/src/pydata_sphinx_theme/assets/styles/pydata-sphinx-theme.scss 2024-12-17 09:10:32.401619489 -0700 +++ pydata-sphinx-theme-0.18.0/src/pydata_sphinx_theme/assets/styles/pydata-sphinx-theme.scss 2026-05-20 09:11:54.447949228 -0600
@@ -7,10 +7,10 @@ @@ -7,10 +7,10 @@
@import "~bootstrap/scss/bootstrap"; @import "~bootstrap/scss/bootstrap";
@ -23,11 +23,3 @@
// Variables // Variables
@import "variables/layout"; @import "variables/layout";
--- pydata-sphinx-theme-0.16.1/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss.orig 2024-12-17 03:38:01.000000000 -0700
+++ pydata-sphinx-theme-0.16.1/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss 2024-12-17 09:10:57.682173950 -0700
@@ -44,4 +44,4 @@ html {
}
$line-height-body: 1.65;
-$fa-font-path: "vendor/fontawesome/webfonts/";
+$fa-font-path: "/usr/share/fontawesome/webfonts/";

View file

@ -6,14 +6,13 @@
%global giturl https://github.com/pydata/pydata-sphinx-theme %global giturl https://github.com/pydata/pydata-sphinx-theme
Name: python-pydata-sphinx-theme Name: python-pydata-sphinx-theme
Version: 0.16.1 Version: 0.21.0
Release: %autorelease Release: %autorelease
Summary: Bootstrap-based Sphinx theme from the PyData community Summary: Bootstrap-based Sphinx theme from the PyData community
# This project is BSD-3-Clause. # This project is BSD-3-Clause.
# The bundled bootstrap JavaScript library is MIT. # The bundled bootstrap JavaScript library is MIT.
License: BSD-3-Clause AND MIT License: BSD-3-Clause AND MIT
BuildArch: noarch
URL: https://pydata-sphinx-theme.readthedocs.io/ URL: https://pydata-sphinx-theme.readthedocs.io/
VCS: git:%{giturl}.git VCS: git:%{giturl}.git
Source0: %{giturl}/archive/v%{version}/pydata-sphinx-theme-%{version}.tar.gz Source0: %{giturl}/archive/v%{version}/pydata-sphinx-theme-%{version}.tar.gz
@ -21,43 +20,37 @@ Source0: %{giturl}/archive/v%{version}/pydata-sphinx-theme-%{version}.tar
Source1: pydata-sphinx-theme-%{version}-vendor.tar.xz Source1: pydata-sphinx-theme-%{version}-vendor.tar.xz
Source2: pydata-sphinx-theme-%{version}-vendor-licenses.txt Source2: pydata-sphinx-theme-%{version}-vendor-licenses.txt
# Compatibility with Pygments 2.19+
Patch: https://github.com/pydata/pydata-sphinx-theme/pull/2091.patch
%if %{with docs} %if %{with docs}
# Generating image files requires network access. Instead, we scrape these from # Generating image files requires network access. Instead, we scrape these from
# https://pydata-sphinx-theme.readthedocs.io/en/latest/_images. See # https://pydata-sphinx-theme.readthedocs.io/en/latest/_images. See
# docs/_static/gallery.yaml for a list of images to download. # docs/_static/gallery.yaml for a list of images to download.
Source3: pydata-gallery.tar.xz Source3: pydata-gallery.tar.xz
%endif %endif
# Fedora-only patch: unbundle the fontawesome fonts
Patch: %{name}-fontawesome.patch BuildArch: noarch
BuildSystem: pyproject
BuildOption(install): -L pydata_sphinx_theme
BuildOption(generate_buildrequires): -x test%{?with_docs:,doc}
BuildRequires: babel BuildRequires: babel
BuildRequires: fontawesome-fonts-all
BuildRequires: fontawesome-fonts-web
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: make BuildRequires: make
BuildRequires: nodejs-devel BuildRequires: nodejs-devel
BuildRequires: nodejs-npm BuildRequires: /usr/bin/node
BuildRequires: python3-devel BuildRequires: /usr/bin/npm
BuildRequires: yarnpkg
Provides: bundled(js-bootstrap) = 5.3.3
%if %{without docs} %if %{without docs}
Obsoletes: %{name}-doc < 0.13.0-1 Obsoletes: %{name}-doc < 0.13.0-1
%endif %endif
%global _description %{expand: %global _description %{expand:This package contains a Sphinx extension for creating document components
This package contains a Sphinx extension for creating document components
optimized for HTML+CSS. optimized for HTML+CSS.
- The panels directive creates panels of content in a grid layout, - The panels directive creates panels of content in a grid layout, utilizing
utilizing both the Bootstrap 4 grid system, and cards layout. both the Bootstrap 5 grid system, and cards layout.
- The link-button directive creates a clickable button, linking to a URL - The link-button directive creates a clickable button, linking to a URL or
or reference, and can also be used to make an entire panel clickable. reference, and can also be used to make an entire panel clickable.
- The dropdown directive creates content that can be toggled. - The dropdown directive creates content that can be toggled.
@ -67,14 +60,22 @@ optimized for HTML+CSS.
See https://pydata-sphinx-theme.readthedocs.io/ for documentation.} See https://pydata-sphinx-theme.readthedocs.io/ for documentation.}
%description %_description %description
%_description
%package -n python3-pydata-sphinx-theme %package -n python3-pydata-sphinx-theme
Summary: Bootstrap-based Sphinx theme from the PyData community Summary: Bootstrap-based Sphinx theme from the PyData community
Requires: fontawesome-fonts-all Requires: fontawesome-fonts-all
Requires: fontawesome-fonts-web Requires: fontawesome-fonts-web
%description -n python3-pydata-sphinx-theme %_description Provides: bundled(npm(bootstrap)) = 5.3.8
%if %{without docs}
Obsoletes: %{name}-doc < 0.13.0-1
%endif
%description -n python3-pydata-sphinx-theme
%_description
%if %{with docs} %if %{with docs}
%package doc %package doc
@ -96,39 +97,47 @@ sed -i 's,https://pydata-sphinx-theme\.readthedocs\.io/en/latest/,,' docs/conf.p
%endif %endif
# Substitute the installed nodejs version for the requested version # Substitute the installed nodejs version for the requested version
%global nodejs_version %(%{_bindir}/node -v | sed s/v//)
sed -i 's,^\(node-version = \)".*",\1"%{nodejs_version}",' pyproject.toml sed -i 's,^\(node-version = \)".*",\1"%{nodejs_version}",' pyproject.toml
# Skip the playwright tests, since playwright is not available in Fedora
%pyproject_patch_dependency pytest-playwright:ignore
# Do not run coverage tools in an RPM build
%pyproject_patch_dependency pytest-cov:ignore
# The Fedora sphinx package does not provide sphinx[test] # The Fedora sphinx package does not provide sphinx[test]
sed -i 's/\(sphinx\)\[test\]/\1/' pyproject.toml sed -i 's/\(sphinx\)\[test\]/\1/' pyproject.toml
%generate_buildrequires %build -p
%pyproject_buildrequires -x test%{?with_docs:,doc} export npm_config_cache="$PWD/.package-cache"
%build
export YARN_CACHE_FOLDER="$PWD/.package-cache"
yarn install --offline
nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv
%pyproject_wheel %install -a
%install
%define instdir %{buildroot}%{python3_sitelib}/pydata_sphinx_theme %define instdir %{buildroot}%{python3_sitelib}/pydata_sphinx_theme
%define themedir %{instdir}/theme/pydata_sphinx_theme/static %define themedir %{instdir}/theme/pydata_sphinx_theme/static
%pyproject_install
%pyproject_save_files -L pydata_sphinx_theme
sed -i '/\.gitignore/d' %{pyproject_files} sed -i '/\.gitignore/d' %{pyproject_files}
rm %{themedir}/.gitignore rm %{themedir}/.gitignore
# More work is required to fully unbundle the fontawesome fonts # Clean up build-host paths leaking into the source maps
sed -i 's,pydata_sphinx_theme/\.\./\.\./\.\./\.\./\.\.,,g' \ sed -i 's|pydata_sphinx_theme/\.\.||g' %{themedir}/scripts/fontawesome.js.map
%{themedir}/scripts/fontawesome.js.map \ sed -i 's|pydata_sphinx_theme/\.\./\.\./\.\./\.\./\.\.||g' \
%{themedir}/styles/pydata-sphinx-theme.css.map %{themedir}/styles/pydata-sphinx-theme.css.map
sed -e 's,url.*fa-solid-900\.woff2.*format("truetype"),local("fontawesome-free-fonts/Font Awesome 6 Free-Solid-900") format("opentype"),g' \
-e 's,url.*fa-regular-400\.woff2.*format("truetype"),local("fontawesome-free-fonts/Font Awesome 6 Free-Regular-400") format("opentype"),g' \ # Unbundle the FontAwesome fonts: webpack already vendors the woff2 files
-e 's,url.*fa-brands-400\.woff2.*format("truetype"),local("fontawesome-brands-fonts/Font Awesome 6 Brands-Regular-400") format("opentype"),g' \ # referenced by the (Fedora-patched) SCSS/JS imports into
-i %{themedir}/styles/pydata-sphinx-theme.css # vendor/fontawesome/webfonts/, copying them from the system
sed -i '/vendor/d' %{pyproject_files} # fontawesome-fonts-web package. Replace those copies with symlinks back to
rm -fr %{themedir}/vendor # that package instead of shipping duplicate binaries. The CSS/JS keep
# referencing them with the same relative url()/path, so nothing else needs to
# change; Sphinx dereferences the symlinks (real files, real bytes) when it
# copies the static assets into a project's own build output, so the generated
# documentation stays fully self-contained.
for font in fa-brands-400.woff2 fa-regular-400.woff2 fa-solid-900.woff2; do
rm -f %{themedir}/vendor/fontawesome/webfonts/$font
ln -s %{_datadir}/fontawesome/webfonts/$font \
%{themedir}/vendor/fontawesome/webfonts/$font
done
%if %{with docs} %if %{with docs}
# We need an installed tree before documentation building works properly # We need an installed tree before documentation building works properly

View file

@ -1,2 +1,2 @@
SHA512 (pydata-sphinx-theme-0.16.1.tar.gz) = a72d5be0dfdd11ffac8ed60521121053343869234b7fc1a5d2ac3b5a78cc3b00afdb7875608bd7cdb455d1bfa92dfdffcf541310aed211f6eb49a6ce29f2c045 SHA512 (pydata-sphinx-theme-0.21.0.tar.gz) = 3dd6b67130f7426b4a7175ee73ceab0f228633ed52914031cb9f6ae45afd59da40efa665d98c9a967ed78885ec3c919a5c6d60d5d4766dfab4f673cdf8b3d2d5
SHA512 (pydata-sphinx-theme-0.16.1-vendor.tar.xz) = 60e59e3105d07273ddce5756a9699cf2e46e555666db5c915de385bc59f65ca6778df6cba877a3b0e319b1f1fd3dee262d6e3bece43f0a0aabeae3d756567d58 SHA512 (pydata-sphinx-theme-0.21.0-vendor.tar.xz) = 4be3365d486dfc3613620af61b1d360448bae06dd44dd56e9336990c2bfd88e7a3b330c9671969b483a09ce5bd9f47951a1d35145df5ae1a3d8c94c81ae45843