2019-06-12 23:08:53 +02:00
|
|
|
#
|
2024-03-07 12:18:04 +01:00
|
|
|
# spec file for package python-jupyterlab-pygments
|
2019-06-12 23:08:53 +02:00
|
|
|
#
|
2024-03-07 12:18:04 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-06-12 23:08:53 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2020-04-26 03:27:51 +02:00
|
|
|
#
|
2019-06-12 23:08:53 +02:00
|
|
|
|
|
|
|
|
2021-11-15 20:05:43 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
2024-03-07 12:18:04 +01:00
|
|
|
%define skip_python39 1
|
2021-11-15 20:05:43 +01:00
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
|
2023-12-23 21:23:08 +01:00
|
|
|
%define distversion 0.3
|
2021-11-15 20:05:43 +01:00
|
|
|
Name: python-jupyterlab-pygments%{psuffix}
|
2023-12-23 21:23:08 +01:00
|
|
|
Version: 0.3.0
|
2019-06-12 23:08:53 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Pygments theme for jupyterlab
|
2020-04-26 03:27:51 +02:00
|
|
|
License: BSD-3-Clause
|
2019-06-12 23:08:53 +02:00
|
|
|
Group: Development/Languages/Python
|
2020-04-26 03:27:51 +02:00
|
|
|
URL: https://github.com/jupyterlab/jupyterlab_pygments
|
2024-05-09 09:00:12 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/j/jupyterlab-pygments/jupyterlab_pygments-%{version}.tar.gz
|
2023-02-02 18:20:05 +01:00
|
|
|
# Slightly modified from https://github.com/jupyterlab/jupyterlab_pygments/blob/0.2.2/notebooks/Example.ipynb
|
|
|
|
Source1: Example.ipynb
|
2023-12-23 21:23:08 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
2024-05-09 09:00:12 +02:00
|
|
|
BuildRequires: %{python_module hatch-jupyter-builder}
|
|
|
|
BuildRequires: %{python_module hatch-nodejs-version}
|
|
|
|
BuildRequires: %{python_module hatchling}
|
2022-08-01 22:31:25 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-06-12 23:08:53 +02:00
|
|
|
BuildRequires: fdupes
|
2022-08-01 22:31:25 +02:00
|
|
|
BuildRequires: jupyter-rpm-macros
|
2019-06-12 23:08:53 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-08-01 22:31:25 +02:00
|
|
|
Requires: jupyter-jupyterlab-pygments = %{version}
|
2019-06-12 23:08:53 +02:00
|
|
|
BuildArch: noarch
|
2021-11-15 20:05:43 +01:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module jupyterlab-pygments = %{version}}
|
|
|
|
BuildRequires: %{python_module nbval}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
%endif
|
2019-06-12 23:08:53 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains a syntax coloring theme for pygments making use
|
|
|
|
of the JupyterLab CSS variables.
|
|
|
|
|
2022-08-01 22:31:25 +02:00
|
|
|
%package -n jupyter-jupyterlab-pygments
|
|
|
|
Summary: Pygments theme for jupyterlab -- Jupyterlab extension files
|
2023-12-23 21:23:08 +01:00
|
|
|
Requires: python3dist(jupyterlab-pygments) = %{distversion}
|
2022-08-01 22:31:25 +02:00
|
|
|
|
|
|
|
%description -n jupyter-jupyterlab-pygments
|
|
|
|
This package contains the Jupyterlab extension files for python-jupyterlab-pygments
|
|
|
|
|
2019-06-12 23:08:53 +02:00
|
|
|
%prep
|
2024-05-09 09:00:12 +02:00
|
|
|
%autosetup -p1 -n jupyterlab_pygments-%{version}
|
2019-06-12 23:08:53 +02:00
|
|
|
|
|
|
|
%build
|
2024-05-09 09:00:12 +02:00
|
|
|
%{pyproject_wheel}
|
2019-06-12 23:08:53 +02:00
|
|
|
|
2022-08-01 22:31:25 +02:00
|
|
|
%if !%{with test}
|
2019-06-12 23:08:53 +02:00
|
|
|
%install
|
2024-05-09 09:00:12 +02:00
|
|
|
%pyproject_install
|
2019-06-12 23:08:53 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2023-12-23 21:23:08 +01:00
|
|
|
find %{buildroot}%{_prefix} -path '*/site-packages/jupyterlab_pygments-%{version}.dist-info/licenses/LICENSE' -exec cp {} . ';' -quit
|
2021-11-15 20:05:43 +01:00
|
|
|
%endif
|
2019-06-12 23:08:53 +02:00
|
|
|
|
2021-11-15 20:05:43 +01:00
|
|
|
%if %{with test}
|
2021-11-14 19:04:04 +01:00
|
|
|
%check
|
|
|
|
%pytest --nbval-lax %{SOURCE1}
|
2021-11-15 20:05:43 +01:00
|
|
|
%endif
|
2021-11-14 19:04:04 +01:00
|
|
|
|
2021-11-15 20:05:43 +01:00
|
|
|
%if !%{with test}
|
2019-06-12 23:08:53 +02:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
2020-04-26 03:27:51 +02:00
|
|
|
%{python_sitelib}/jupyterlab_pygments
|
2022-08-01 22:31:25 +02:00
|
|
|
%{python_sitelib}/jupyterlab_pygments-%{version}.dist-info
|
|
|
|
|
|
|
|
%files -n jupyter-jupyterlab-pygments
|
2022-12-25 12:39:45 +01:00
|
|
|
%{_jupyter_labextensions_dir3}/jupyterlab_pygments
|
2021-11-15 20:05:43 +01:00
|
|
|
%endif
|
2019-06-12 23:08:53 +02:00
|
|
|
|
|
|
|
%changelog
|