Compare commits
9 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd83d2ad6e | ||
|
|
629f036b47 | ||
|
|
c6c3c33fb9 | ||
|
|
19a29bfb70 | ||
|
|
872c3f0189 | ||
|
|
c5bda8d06b | ||
|
|
a34cf31b79 | ||
|
|
9c682e85b6 | ||
|
|
dcc6b4d28f |
4 changed files with 34 additions and 35 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
yarn run v1.22.22
|
├─ MIT: 345
|
||||||
$ /tmp/node_modules/.bin/license-checker --summary
|
|
||||||
├─ MIT: 346
|
|
||||||
├─ ISC: 38
|
├─ ISC: 38
|
||||||
├─ BSD-2-Clause: 19
|
├─ BSD-2-Clause: 19
|
||||||
├─ BSD-3-Clause: 8
|
├─ BSD-3-Clause: 8
|
||||||
├─ Apache-2.0: 7
|
├─ Apache-2.0: 7
|
||||||
├─ CC0-1.0: 4
|
├─ CC0-1.0: 3
|
||||||
├─ MIT-0: 2
|
├─ MIT-0: 2
|
||||||
├─ (CC-BY-4.0 AND OFL-1.1 AND MIT): 1
|
├─ (CC-BY-4.0 AND OFL-1.1 AND MIT): 1
|
||||||
├─ Python-2.0: 1
|
├─ Python-2.0: 1
|
||||||
|
|
@ -17,4 +15,3 @@ $ /tmp/node_modules/.bin/license-checker --summary
|
||||||
├─ (MIT AND CC-BY-3.0): 1
|
├─ (MIT AND CC-BY-3.0): 1
|
||||||
└─ 0BSD: 1
|
└─ 0BSD: 1
|
||||||
|
|
||||||
Done in 0.68s.
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
%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.18.0
|
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
|
||||||
|
|
||||||
|
|
@ -26,8 +26,6 @@ Source2: pydata-sphinx-theme-%{version}-vendor-licenses.txt
|
||||||
# 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
|
BuildArch: noarch
|
||||||
BuildSystem: pyproject
|
BuildSystem: pyproject
|
||||||
|
|
@ -35,16 +33,11 @@ BuildOption(install): -L pydata_sphinx_theme
|
||||||
BuildOption(generate_buildrequires): -x test%{?with_docs:,doc}
|
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: /usr/bin/node
|
BuildRequires: /usr/bin/node
|
||||||
BuildRequires: /usr/bin/npm
|
BuildRequires: /usr/bin/npm
|
||||||
BuildRequires: yarnpkg
|
|
||||||
|
|
||||||
Provides: bundled(npm(bootstrap)) = 5.3.8
|
|
||||||
|
|
||||||
%if %{without docs}
|
%if %{without docs}
|
||||||
Obsoletes: %{name}-doc < 0.13.0-1
|
Obsoletes: %{name}-doc < 0.13.0-1
|
||||||
|
|
@ -74,7 +67,8 @@ See https://pydata-sphinx-theme.readthedocs.io/ for documentation.}
|
||||||
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
|
||||||
Provides: bundled(js-bootstrap) = 5.3.8
|
|
||||||
|
Provides: bundled(npm(bootstrap)) = 5.3.8
|
||||||
|
|
||||||
%if %{without docs}
|
%if %{without docs}
|
||||||
Obsoletes: %{name}-doc < 0.13.0-1
|
Obsoletes: %{name}-doc < 0.13.0-1
|
||||||
|
|
@ -116,8 +110,7 @@ sed -i 's,^\(node-version = \)".*",\1"%{nodejs_version}",' pyproject.toml
|
||||||
sed -i 's/\(sphinx\)\[test\]/\1/' pyproject.toml
|
sed -i 's/\(sphinx\)\[test\]/\1/' pyproject.toml
|
||||||
|
|
||||||
%build -p
|
%build -p
|
||||||
export YARN_CACHE_FOLDER="$PWD/.package-cache"
|
export npm_config_cache="$PWD/.package-cache"
|
||||||
yarn install --offline
|
|
||||||
nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv
|
nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv
|
||||||
|
|
||||||
%install -a
|
%install -a
|
||||||
|
|
@ -126,16 +119,25 @@ nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv
|
||||||
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
|
||||||
|
|
|
||||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
||||||
SHA512 (pydata-sphinx-theme-0.18.0.tar.gz) = ecd6d9e138007ca7c42807d3fad9d275abc1531f3360beeae18d8b960825a2704de1c136c6bc49e74f82a7bf29094fcee5c43da551d6b99831b4f8e82156dcfd
|
SHA512 (pydata-sphinx-theme-0.21.0.tar.gz) = 3dd6b67130f7426b4a7175ee73ceab0f228633ed52914031cb9f6ae45afd59da40efa665d98c9a967ed78885ec3c919a5c6d60d5d4766dfab4f673cdf8b3d2d5
|
||||||
SHA512 (pydata-sphinx-theme-0.18.0-vendor.tar.xz) = 925d7589105d314176ae051e8342b2d65b63d1a941cde3a83700118d5823843e9a0c15fbc55da1dc2f0db5f9c6805af74702c77d3ef932fdcb679d2849adcafa
|
SHA512 (pydata-sphinx-theme-0.21.0-vendor.tar.xz) = 4be3365d486dfc3613620af61b1d360448bae06dd44dd56e9336990c2bfd88e7a3b330c9671969b483a09ce5bd9f47951a1d35145df5ae1a3d8c94c81ae45843
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue