Blame python-jupyterlab_pygments.spec

c5d414b
# Created by pyp2rpm-3.3.5
c5d414b
%global pypi_name jupyterlab_pygments
c5d414b
c5d414b
Name:           python-%{pypi_name}
228ac4c
Version:        0.3.0
a545649
Release:        %autorelease
c5d414b
Summary:        Pygments theme
228ac4c
# Jupyterlab_pygments is BSD-3-Clause
228ac4c
# Bundled JS libs licences
228ac4c
# To get them, run:
228ac4c
# cat third-party-licenses.json | sed -n '/licenseId/s/"licenseId": "\(.*\)",/\1/p' | sort | uniq
228ac4c
# in jupyterlab_pygments/labextension/static. The result is:
228ac4c
#
228ac4c
# MIT
228ac4c
License:        BSD-3-Clause AND MIT
c5d414b
URL:            https://github.com/jupyterlab/jupyterlab_pygments
c5d414b
Source0:        %{pypi_source}
228ac4c
Patch:          drop-hatch-nodejs-version.patch
c5d414b
c5d414b
BuildArch:      noarch
c5d414b
c5d414b
BuildRequires:  python3-devel
c5d414b
c5d414b
%description
c5d414b
This package contains a syntax coloring theme for pygments making use of the 
c5d414b
JupyterLab CSS variables.
c5d414b
c5d414b
%package -n     python3-%{pypi_name}
c5d414b
Summary:        %{summary}
c5d414b
%{?python_provide:%python_provide python3-%{pypi_name}}
c5d414b
c5d414b
Requires:       (python3dist(pygments) >= 2.4.1 with python3dist(pygments) < 3)
c5d414b
228ac4c
# Bundled provides
228ac4c
# Generated by:
228ac4c
# python3 -c "import json; [print(f\"Provides:        bundled(npm({p['name']})) = {p['versionInfo']}\") for p in json.load(open(\"third-party-licenses.json\"))[\"packages\"]]"
228ac4c
# in jupyterlab_pygments/labextension/static.
228ac4c
Provides:        bundled(npm(css-loader)) = 6.8.1
228ac4c
Provides:        bundled(npm(style-loader)) = 3.3.3
228ac4c
c5d414b
%description -n python3-%{pypi_name}
c5d414b
This package contains a syntax coloring theme for pygments making use of the 
c5d414b
JupyterLab CSS variables.
c5d414b
c5d414b
c5d414b
c5d414b
%prep
228ac4c
%autosetup -p1 -n %{pypi_name}-%{version}
c5d414b
# Remove bundled egg-info
c5d414b
rm -rf %{pypi_name}.egg-info
228ac4c
# Replace dynamic version
228ac4c
sed -i "s/##VERSION##/%{version}/" pyproject.toml
208d23f
# Remove the build-time dependency on jupyterlab - it's only needed if
208d23f
# node.js packages are installed during the build, which is not the case in Fedora
208d23f
sed -i '/"jupyterlab[><"]/d' pyproject.toml
228ac4c
228ac4c
%generate_buildrequires
228ac4c
%pyproject_buildrequires
c5d414b
c5d414b
%build
228ac4c
%pyproject_wheel
c5d414b
c5d414b
%install
228ac4c
%pyproject_install
228ac4c
%pyproject_save_files %{pypi_name}
c5d414b
228ac4c
%files -n python3-%{pypi_name} -f %{pyproject_files}
c5d414b
%license LICENSE
c5d414b
%doc README.md
228ac4c
%{_datadir}/jupyter/labextensions/jupyterlab_pygments
c5d414b
c5d414b
%changelog
a545649
%autochangelog