From 9c59e6706fc752f5cfd6aba06ed69e9a9a9a7b0898e5375afec0bb455bdfebfd Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Mon, 1 Aug 2022 20:31:25 +0000 Subject: [PATCH] - 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 --- Example.ipynb | 14 ++------ jupyterlab_pygments-0.1.2.tar.gz | 3 -- ...terlab_pygments-0.2.2-py2.py3-none-any.whl | 3 ++ python-jupyterlab-pygments.changes | 7 ++++ python-jupyterlab-pygments.spec | 36 ++++++++++++------- 5 files changed, 36 insertions(+), 27 deletions(-) delete mode 100644 jupyterlab_pygments-0.1.2.tar.gz create mode 100644 jupyterlab_pygments-0.2.2-py2.py3-none-any.whl diff --git a/Example.ipynb b/Example.ipynb index a31044e..5793f0d 100644 --- a/Example.ipynb +++ b/Example.ipynb @@ -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'
{html}
'" + " return f'
{html}
'" ] }, { @@ -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, diff --git a/jupyterlab_pygments-0.1.2.tar.gz b/jupyterlab_pygments-0.1.2.tar.gz deleted file mode 100644 index 6ce3312..0000000 --- a/jupyterlab_pygments-0.1.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cfcda0873626150932f438eccf0f8bf22bfa92345b814890ab360d666b254146 -size 4181 diff --git a/jupyterlab_pygments-0.2.2-py2.py3-none-any.whl b/jupyterlab_pygments-0.2.2-py2.py3-none-any.whl new file mode 100644 index 0000000..7c47398 --- /dev/null +++ b/jupyterlab_pygments-0.2.2-py2.py3-none-any.whl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2405800db07c9f770863bcf8049a529c3dd4d3e28536638bd7c1c01d2748309f +size 21953 diff --git a/python-jupyterlab-pygments.changes b/python-jupyterlab-pygments.changes index 7cc136e..bb981d2 100644 --- a/python-jupyterlab-pygments.changes +++ b/python-jupyterlab-pygments.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 1 20:29:07 UTC 2022 - Ben Greiner + +- Update to v0.2.2 + * no release notes +- Add labextensions subpackage + ------------------------------------------------------------------- Mon Nov 15 19:01:14 UTC 2021 - Ben Greiner diff --git a/python-jupyterlab-pygments.spec b/python-jupyterlab-pygments.spec index bf394ea..dfcb502 100644 --- a/python-jupyterlab-pygments.spec +++ b/python-jupyterlab-pygments.spec @@ -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