public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-jupyterlab_pygments] rawhide: Use cog to generate package metadata
@ 2026-10-12 9:15 Lumir Balhar
0 siblings, 0 replies; only message in thread
From: Lumir Balhar @ 2026-10-12 9:15 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-jupyterlab_pygments
Branch : rawhide
Commit : 5310aa6aef24d795fd83c5c455ba10513225ef91
Author : Lumir Balhar <lbalhar@redhat.com>
Date : 2026-10-12T10:52:00+02:00
Stats : +26/-9 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-jupyterlab_pygments/c/5310aa6aef24d795fd83c5c455ba10513225ef91?branch=rawhide
Log:
Use cog to generate package metadata
---
diff --git a/python-jupyterlab_pygments.spec b/python-jupyterlab_pygments.spec
index c695471..099a9b0 100644
--- a/python-jupyterlab_pygments.spec
+++ b/python-jupyterlab_pygments.spec
@@ -5,13 +5,26 @@ 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:
+# jupyterlab_pygments itself is BSD-3-Clause.
+# The rest are licenses of bundled JS libs.
#
+# [[[cog
+# import cog
+# from glob import glob
+# from pathlib import Path
+# import json
+#
+# file = sorted(
+# glob("python-jupyterlab_pygments-*-build/jupyterlab_pygments-*/jupyterlab_pygments/labextension/static/third-party-licenses.json")
+# )[-1]
+# text = Path(file).read_text()
+# data = json.loads(text)
+# licenses = set([p["licenseId"] for p in data["packages"]])
+# for license in sorted(licenses):
+# cog.outl(f"# {license}")
+# ]]]
# MIT
+# [[[end]]]
License: BSD-3-Clause AND MIT
URL: https://github.com/jupyterlab/jupyterlab_pygments
Source0: %{pypi_source}
@@ -31,12 +44,16 @@ Summary: %{summary}
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.
+# Bundled provides (uses data loaded above)
+#
+# [[[cog
+# packages = [(p["name"], p["versionInfo"]) for p in data["packages"]]
+# for name, version in sorted(packages):
+# cog.outl(f"Provides: bundled(npm({name})) = {version}")
+# ]]]
Provides: bundled(npm(css-loader)) = 6.8.1
Provides: bundled(npm(style-loader)) = 3.3.3
+# [[[end]]]
%description -n python3-%{pypi_name}
This package contains a syntax coloring theme for pygments making use of the
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-12 9:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-12 9:15 [rpms/python-jupyterlab_pygments] rawhide: Use cog to generate package metadata Lumir Balhar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox