- Update to v0.2.2

* no release notes
- Add labextensions subpackage

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyterlab-pygments?expand=0&rev=9
This commit is contained in:
Benjamin Greiner 2022-08-01 20:31:25 +00:00 committed by Git OBS Bridge
parent d0f7770a0e
commit 9c59e6706f
5 changed files with 36 additions and 27 deletions

View File

@ -25,8 +25,7 @@
" def _repr_html_(self, **kwargs):\n",
" formatter = HtmlFormatter(style=JupyterStyle)\n",
" html = highlight(self.value, PythonLexer(), formatter)\n",
" css = formatter.get_style_defs('.highlight')\n",
" return f'<style>{css}</style><div class=\"highlight\">{html}</div>'"
" return f'<div class=\"highlight\">{html}</div>'"
]
},
{
@ -44,18 +43,11 @@
"source": [
"PythonCode(In[2])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@ -69,7 +61,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.10.4"
}
},
"nbformat": 4,

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfcda0873626150932f438eccf0f8bf22bfa92345b814890ab360d666b254146
size 4181

BIN
jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 1 20:29:07 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to v0.2.2
* no release notes
- Add labextensions subpackage
-------------------------------------------------------------------
Mon Nov 15 19:01:14 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,20 +25,21 @@
%bcond_with test
%endif
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-jupyterlab-pygments%{psuffix}
Version: 0.1.2
Version: 0.2.2
Release: 0
Summary: Pygments theme for jupyterlab
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/jupyterlab/jupyterlab_pygments
Source: https://files.pythonhosted.org/packages/source/j/jupyterlab_pygments/jupyterlab_pygments-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/py2.py3/j/jupyterlab-pygments/jupyterlab_pygments-%{version}-py2.py3-none-any.whl
Source1: https://raw.githubusercontent.com/jupyterlab/jupyterlab_pygments/%{version}/notebooks/Example.ipynb
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: jupyter-rpm-macros
BuildRequires: python-rpm-macros
Requires: jupyter-jupyterlab-pygments = %{version}
Requires: python-pygments >= 2.4.1
BuildArch: noarch
%if %{with test}
@ -52,16 +53,23 @@ BuildRequires: %{python_module pytest}
This package contains a syntax coloring theme for pygments making use
of the JupyterLab CSS variables.
%package -n jupyter-jupyterlab-pygments
Summary: Pygments theme for jupyterlab -- Jupyterlab extension files
%description -n jupyter-jupyterlab-pygments
This package contains the Jupyterlab extension files for python-jupyterlab-pygments
%prep
%setup -q -n jupyterlab_pygments-%{version}
%setup -q -c -T
%build
:
%if !%{with test}
%build
%python_build
%install
%python_install
%pyproject_install %{SOURCE0}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
cp %{buildroot}%{python3_sitelib}/jupyterlab_pygments-%{version}.dist-info/LICENSE .
%endif
%if %{with test}
@ -72,9 +80,11 @@ of the JupyterLab CSS variables.
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/jupyterlab_pygments
%{python_sitelib}/jupyterlab_pygments-%{version}*-info
%{python_sitelib}/jupyterlab_pygments-%{version}.dist-info
%files -n jupyter-jupyterlab-pygments
%_jupyter_labextensions_dir3/jupyterlab_pygments
%endif
%changelog