forked from pool/python-pydata-sphinx-theme
Accepting request 1070617 from home:dgarcia:sphinx-theme-builder
OBS-URL: https://build.opensuse.org/request/show/1070617 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydata-sphinx-theme?expand=0&rev=6
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pydata-sphinx-theme
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,24 +16,31 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python36 1
|
||||
Name: python-pydata-sphinx-theme
|
||||
Version: 0.7.1
|
||||
Version: 0.13.1
|
||||
Release: 0
|
||||
Summary: Bootstrap-based Sphinx theme from the PyData community
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/pydata/pydata-sphinx-theme
|
||||
# Source: https://files.pythonhosted.org/packages/source/p/pydata-sphinx-theme/pydata-sphinx-theme-%%{version}.tar.gz
|
||||
Source: pydata-sphinx-theme-%{version}.tar.gz
|
||||
# Source: https://files.pythonhosted.org/packages/source/p/pydata-sphinx-theme/pydata_sphinx_theme-%%{version}.tar.gz
|
||||
# Source1 and Source2 created with ./prepare_vendor.sh
|
||||
Source1: python-pydata-sphinx-theme-%{version}-vendor.tar.xz
|
||||
Source2: python-pydata-sphinx-theme-%{version}-vendor-licenses.txt
|
||||
Source99: prepare_vendor.sh
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest-regressions}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module sphinx-theme-builder}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Sphinx
|
||||
Requires: python-beautifulsoup4
|
||||
Requires: python-docutils
|
||||
Requires: python-sphinx-theme-builder
|
||||
Suggests: python-beautifulsoup4
|
||||
Suggests: python-codecov
|
||||
Suggests: python-docutils
|
||||
@@ -47,9 +54,15 @@ Suggests: python-Sphinx
|
||||
Suggests: python-xarray
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module beautifulsoup4}
|
||||
BuildRequires: %{python_module accessible-pygments}
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
BuildRequires: %{python_module beautifulsoup4}
|
||||
BuildRequires: %{python_module docutils}
|
||||
BuildRequires: nodejs-packaging
|
||||
BuildRequires: nodejs19
|
||||
BuildRequires: nodejs19-devel
|
||||
BuildRequires: yarn
|
||||
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
@@ -57,17 +70,33 @@ BuildRequires: %{python_module docutils}
|
||||
Bootstrap-based Sphinx theme from the PyData community
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n pydata-sphinx-theme-%{version}
|
||||
%autosetup -p1 -n pydata-sphinx-theme-%{version} -a1
|
||||
sed -i 's,^\(node-version = \)".*",\1"%{nodejs_version}",' pyproject.toml
|
||||
|
||||
# Create a node header tarball so we don't try to download it
|
||||
mkdir -p node-v%{nodejs_version}/include
|
||||
cp -a %{_includedir}/node19 node-v%{nodejs_version}/include/node
|
||||
tar czf node-v%{nodejs_version}-headers.tar.gz node-v%{nodejs_version}
|
||||
echo "tarball=\"$PWD/node-v%{nodejs_version}-headers.tar.gz\"" > .npmrc
|
||||
|
||||
%build
|
||||
%python_build
|
||||
export STB_USE_SYSTEM_NODE=1
|
||||
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
|
||||
export YARN_CACHE_FOLDER="$PWD/.package-cache"
|
||||
export NODE_OPTIONS=--openssl-legacy-provider
|
||||
yarn install --offline
|
||||
|
||||
# nodeenv generated with python3, no need to generate a different
|
||||
# nodeenv for each flavor
|
||||
python3 -m nodeenv --node=system --prebuilt --clean-src $PWD/.nodeenv
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
%pytest -v
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
|
Reference in New Issue
Block a user