From d87130c34d9d785c9f91b9f5a52be0a16309205b Mon Sep 17 00:00:00 2001 From: tigro Date: Sun, 5 Jan 2025 23:27:50 +0300 Subject: [PATCH] import python-jupyterlab_pygments-0.3.0-7.el10 --- .gitignore | 1 + .python-jupyterlab_pygments.metadata | 1 + SOURCES/drop-hatch-nodejs-version.patch | 58 ++++++++++ SPECS/python-jupyterlab_pygments.spec | 135 ++++++++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 .gitignore create mode 100644 .python-jupyterlab_pygments.metadata create mode 100644 SOURCES/drop-hatch-nodejs-version.patch create mode 100644 SPECS/python-jupyterlab_pygments.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..75a89d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/jupyterlab_pygments-0.3.0.tar.gz diff --git a/.python-jupyterlab_pygments.metadata b/.python-jupyterlab_pygments.metadata new file mode 100644 index 0000000..b249d51 --- /dev/null +++ b/.python-jupyterlab_pygments.metadata @@ -0,0 +1 @@ +5f8b58026cc7c0eac323f0fa1a76cb2ad404bf46 SOURCES/jupyterlab_pygments-0.3.0.tar.gz diff --git a/SOURCES/drop-hatch-nodejs-version.patch b/SOURCES/drop-hatch-nodejs-version.patch new file mode 100644 index 0000000..204bccc --- /dev/null +++ b/SOURCES/drop-hatch-nodejs-version.patch @@ -0,0 +1,58 @@ +From 4cb6e6422bc06a6436c8492fef3ef5cdff343b4c Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Thu, 23 Nov 2023 14:40:27 +0100 +Subject: [PATCH] drop-hatch-nodejs-version + +--- + pyproject.toml | 19 +------------------ + 1 file changed, 1 insertion(+), 18 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index b21c51a..5aba02e 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -2,12 +2,12 @@ + requires = [ + "hatchling>=1.5.0", + "jupyterlab>=4.0.0,<5", +- "hatch-nodejs-version>=0.3.2", + ] + build-backend = "hatchling.build" + + [project] + name = "jupyterlab_pygments" ++version = "##VERSION##" + readme = "README.md" + requires-python = ">=3.8" + classifiers = [ +@@ -26,27 +26,10 @@ classifiers = [ + "Programming Language :: Python :: 3.12", + ] + dependencies = [] +-dynamic = [ +- "version", +- "description", +- "authors", +- "urls", +- "keywords", +-] + + [project.license] + file = "LICENSE" + +-[tool.hatch.version] +-source = "nodejs" +- +-[tool.hatch.metadata.hooks.nodejs] +-fields = [ +- "description", +- "authors", +- "urls", +-] +- + [tool.hatch.build.targets.sdist] + artifacts = [ + "jupyterlab_pygments/labextension", +-- +2.42.0 + diff --git a/SPECS/python-jupyterlab_pygments.spec b/SPECS/python-jupyterlab_pygments.spec new file mode 100644 index 0000000..b4110e4 --- /dev/null +++ b/SPECS/python-jupyterlab_pygments.spec @@ -0,0 +1,135 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 7; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +# Created by pyp2rpm-3.3.5 +%global pypi_name jupyterlab_pygments + +Name: python-%{pypi_name} +Version: 0.3.0 +Release: %autorelease +Summary: Pygments theme +# Jupyterlab_pygments is BSD-3-Clause +# Bundled JS libs licences +# To get them, run: +# cat third-party-licenses.json | sed -n '/licenseId/s/"licenseId": "\(.*\)",/\1/p' | sort | uniq +# in jupyterlab_pygments/labextension/static. The result is: +# +# MIT +License: BSD-3-Clause AND MIT +URL: https://github.com/jupyterlab/jupyterlab_pygments +Source0: %{pypi_source} +Patch: drop-hatch-nodejs-version.patch + +BuildArch: noarch + +BuildRequires: python3-devel + +%description +This package contains a syntax coloring theme for pygments making use of the +JupyterLab CSS variables. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: (python3dist(pygments) >= 2.4.1 with python3dist(pygments) < 3) + +# Bundled provides +# Generated by: +# python3 -c "import json; [print(f\"Provides: bundled(npm({p['name']})) = {p['versionInfo']}\") for p in json.load(open(\"third-party-licenses.json\"))[\"packages\"]]" +# in jupyterlab_pygments/labextension/static. +Provides: bundled(npm(css-loader)) = 6.8.1 +Provides: bundled(npm(style-loader)) = 3.3.3 + +%description -n python3-%{pypi_name} +This package contains a syntax coloring theme for pygments making use of the +JupyterLab CSS variables. + + + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info +# Replace dynamic version +sed -i "s/##VERSION##/%{version}/" pyproject.toml +# Remove the build-time dependency on jupyterlab - it's only needed if +# node.js packages are installed during the build, which is not the case in Fedora +sed -i '/"jupyterlab[><"]/d' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{pypi_name} + +%files -n python3-%{pypi_name} -f %{pyproject_files} +%license LICENSE +%doc README.md +%{_datadir}/jupyter/labextensions/jupyterlab_pygments + +%changelog +* Sun Jan 05 2025 Arkady L. Shane - 0.3.0-7 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Fri Jul 19 2024 Fedora Release Engineering - 0.3.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 0.3.0-6 +- Rebuilt for Python 3.13 + +* Wed Jan 31 2024 Karolina Surma - 0.3.0-4 +- Don't require jupyterlab to build the package + +* Fri Jan 26 2024 Fedora Release Engineering - 0.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Nov 23 2023 Lumír Balhar - 0.3.0-1 +- Update to 0.3.0 (rhbz#2251177) + +* Fri Jul 21 2023 Fedora Release Engineering - 0.1.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 0.1.2-9 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.1.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.1.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.1.2-6 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.1.2-3 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Nov 26 2020 Mukundan Ragavan - 0.1.2-1 +- Initial package. + +## END: Generated by rpmautospec