public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Lumir Balhar <lbalhar@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-jupyterlab_pygments] rawhide: Use cog to generate package metadata
Date: Mon, 12 Oct 2026 09:15:22 GMT	[thread overview]
Message-ID: <179179652281.1.56057213651948900.rpms-python-jupyterlab_pygments-5310aa6aef24@fedoraproject.org> (raw)

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 

                 reply	other threads:[~2026-10-12  9:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179179652281.1.56057213651948900.rpms-python-jupyterlab_pygments-5310aa6aef24@fedoraproject.org \
    --to=lbalhar@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox