Logo : Python Packaging License Checker

Python Packaging License Checker

Organisation
opendatahub-io
python-packaging-license-checker

Use this skill to check whether a Python package license is compatible with redistribution in Red Hat products, using the Fedora License Data as the authoritative policy source. Produces a structured six-field verdict with escalation guidance for non-trivial cases.

Présentation

Éditeuropendatahub-io
Dépôtai-helpers
Nom de la compétencepython-packaging-license-checker
Étoiles
39
Forks
76
Fichiers inclus
Instructions uniquement
LicenceApache-2.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par opendatahub-io sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Python Packaging License Checker dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-python-packaging/skills/python-packaging-license-checker
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/opendatahub-io/ai-helpers.git /tmp/ai-helpers
mkdir -p .claude/skills
cp -r /tmp/ai-helpers/plugins/odh-python-packaging/skills/python-packaging-license-checker .claude/skills/python-packaging-license-checker
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Python Packaging License Checker dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Python Packaging License Checker dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Python Packaging License Checker n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Python Package License Compatibility Checker

Evaluate whether a Python package license permits redistribution in Red Hat products.

Policy basis: Red Hat redistribution policy follows the Fedora Linux license policy. Use the Fedora License Data as the authoritative source -- NOT OSI-approval status.

Inputs

  • package_name: Python package name
  • repo_url: upstream repository URL (if already known — skip the source-finder step and clone this directly)
  • source_available: whether buildable source exists (if already known)
  • upstream_org: name and primary country of the maintaining organisation (if already known)

Step 1: Locate and clone the source repository

If a repo_url is provided, skip the source-finder step and use the provided URL directly with the git-shallow-clone skill.

Otherwise, use the python-packaging-source-finder skill to find the upstream repo URL:

text
Skill: python-packaging-source-finder

Then use the git-shallow-clone skill to clone the repository locally:

text
Skill: git-shallow-clone

This gives a local path to the cloned repo for deterministic license inspection.

Step 2: Read the license from source

Search the cloned repo root for license files in this order: LICENSE, LICENSE.txt, LICENSE.md, COPYING, COPYING.txt, LICENCE, LICENCE.txt

bash
ls <clone_path>/{LICENSE,COPYING,LICENCE}{,.txt,.md} 2>/dev/null | head -1

Read the license file (up to 128 KB) and map to an SPDX identifier. If the file exceeds 128 KB, read only the first 128 KB and note the truncation. If the file cannot be read within 30 seconds, treat it as unreadable and set Verdict: NEEDS-HUMAN-REVIEW with a note explaining the timeout.

Also check pyproject.toml or setup.cfg for a license field as a secondary signal. If the PyPI metadata license differs from the source file, set Source verified: MISMATCH (PyPI: [X], repo: [Y]) and use the source file as authoritative.

Normalise to SPDX ID using exact then fuzzy matching:

  • Deterministic: "Apache 2" -> Apache-2.0, "GPL v2" -> GPL-2.0-only, "MIT License" -> MIT, "LGPLv2.1" -> LGPL-2.1-only
  • Ambiguous (do NOT auto-map): "BSD", "GPLv3" -> set NEEDS-HUMAN-REVIEW. These tokens map to multiple SPDX IDs; require human confirmation.

Compound expressions: If the license contains AND or OR:

  • AND: split into components; every component must be individually allowed. If any single component is not-allowed, the whole expression is BLOCKED. Document the split in Notes.
  • OR: evaluate each component; use the most permissive allowed one. If none are allowed, the overall verdict is the best individual verdict.

If no license file found and no SPDX mapping possible: Verdict: NEEDS-HUMAN-REVIEW.

Clean up the clone when done:

bash
if [ -n "${CLONE_DIR}" ] && echo "${CLONE_DIR}" | grep -q '^/tmp/'; then
  rm -rf -- "${CLONE_DIR}"
else
  echo "ERROR: refusing to delete '${CLONE_DIR}' -- not under /tmp/" >&2
fi

Step 3: Look up license in Fedora License Data

Fetch the live data:

text
WebFetch: https://gitlab.com/fedora/legal/fedora-license-data/-/jobs/artifacts/main/raw/fedora-licenses.json?job=json

Search for an entry matching the SPDX ID (case-insensitive on spdx_abbrev). Each entry has a status field which may be a string or an array. Normalise to an array and apply the following deterministic mapping.

Fedora License Data defines these status values:

StatusMeaningOutcome
allowedApproved for Fedora packagesProceed to Step 4
allowed-fontsApproved only for font packagesProceed to Step 4 (add note: "License approved for fonts only; verify component type")
allowed-documentationApproved only for documentationProceed to Step 4 (add note: "License approved for documentation only; verify component type")
allowed-contentApproved only for content (non-code)Proceed to Step 4 (add note: "License approved for content only; verify component type")
not-allowedExplicitly prohibitedVerdict: BLOCKED

Apply fail-closed logic:

  • If any entry is "not-allowed" -> Verdict: BLOCKED
  • If all entries are one of the allowed* statuses above (and none "not-allowed") -> proceed to Step 4
  • If the status field is missing, empty, or contains a value not listed in the table above -> Verdict: NEEDS-HUMAN-REVIEW (note the unrecognised value)
  • SPDX ID not found in data -> Verdict: NEEDS-HUMAN-REVIEW

Fallback table (use only when the JSON fetch fails):

StatusSPDX identifiers (representative)
allowedMIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, PSF-2.0, CC0-1.0
allowedGPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later
allowedLGPL-2.0-only, LGPL-2.1-only, LGPL-2.1-or-later, LGPL-3.0-or-later
allowedAGPL-3.0-only, AGPL-3.0-or-later, MPL-2.0, EUPL-1.2, EPL-2.0
not-allowedSSPL-1.0, BUSL-1.1, Commons-Clause
ESCALATEAny custom/proprietary license not in SPDX

When using fallback, append to Notes: "Fedora License Data unreachable; fallback table used. Verify at https://docs.fedoraproject.org/en-US/legal/allowed-licenses/"

Step 4: Verdict refinement (apply in order)

Rule A -- Proprietary or custom license (not in Fedora data):

First check the Vendor Agreements table below. If covered by an agreement: Verdict: ALLOWED, Notes: "Covered by Red Hat [Vendor] redistribution agreement."

Otherwise:

  • Red Hat / IBM-owned upstream (e.g. Neural Magic): Verdict: ESCALATE-TO-LEGAL. Notes: "Red Hat-owned proprietary license. Must be relicensed before inclusion. Open a ServiceNow opensource-legal ticket."
  • Third-party proprietary: Verdict: ESCALATE-TO-LEGAL. Notes: "Third-party proprietary license. May be includable as a EULA-listed component. Open a legal-review task."

Rule B -- AGPL-3.0 (status=allowed, SPDX is AGPL-3.0-only or -or-later): Verdict: ALLOWED-WITH-CAVEAT. Notes: "AGPL-3.0 is allowed for redistribution but is frequently part of a dual-licensing strategy, increasing risk. PM sign-off required."

Rule C -- All other allowed licenses: Verdict: ALLOWED. Notes: omit unless compliance note needed (e.g. LGPL dynamic linking does not propagate copyleft).

Rule D -- Not-allowed: Verdict: BLOCKED. Notes: "License is on the Fedora not-allowed list."

Step 5: Compliance checks

Build compliance (independent of license verdict): If source_available is false or no buildable source exists (no setup.py, pyproject.toml, or equivalent):

  • Build compliance: BUILD-COMPLIANCE-FLAG
  • Append to Notes: "No buildable source. Options: (1) request upstream sdist, (2) make dependency optional, (3) file PSX exception with 6-month deadline per PSS.SBR.02.02."
  • Otherwise: Build compliance: OK

Export compliance (independent of license verdict): Check the upstream org's primary country against these authoritative machine-readable sources:

For each source checked, record the following metadata:

  • source_url: the URL fetched
  • retrieved_at: ISO 8601 timestamp of the fetch
  • fetch_outcome: success or failure
  • retry_count: number of retries attempted (0 if first attempt succeeded)

If flagged by any source:

  • Export compliance: EXPORT-COMPLIANCE-FLAG
  • Append to Notes: "Upstream org may require export compliance review. Contact exportcompliance@redhat.com. Source: <source_url>; Fetched: <retrieved_at>; Outcome: <fetch_outcome>; Retries: <retry_count>. Geopolitical sensitivity does not automatically block inclusion."

If sources are unreachable after 2 retries:

  • Export compliance: EXPORT-COMPLIANCE-FLAG
  • Append to Notes: "Export sanctions data unreachable (Retries: <retry_count>). Verdict: NEEDS-HUMAN-REVIEW"

Otherwise: Export compliance: OK

Output Format

Produce ONLY this six-field block. No preamble, no extra text.

text
_License:_ [SPDX expression, or "non-SPDX: [raw string]" if unmappable]
_Source verified:_ YES | NO | MISMATCH (PyPI: [X], repo: [Y])
_Verdict:_ ALLOWED | ALLOWED-WITH-CAVEAT | NEEDS-HUMAN-REVIEW | ESCALATE-TO-LEGAL | BLOCKED
_Build compliance:_ OK | BUILD-COMPLIANCE-FLAG
_Export compliance:_ OK | EXPORT-COMPLIANCE-FLAG
_Notes:_ [Actionable guidance. Omit if verdict is ALLOWED and all flags are OK.]

Vendor Agreements

VendorCovered components
NVIDIACUDA libraries, runtimes, NCCL, and related NVIDIA components
Intel GaudiGaudi AI accelerator software and libraries
IBM SpyreIBM Spyre AI hardware and associated software components

Quick Reference

ScenarioVerdictBuild
MIT, Apache-2.0, BSD-*, ISC, PSF-2.0ALLOWEDOK
GPL-*, LGPL-*ALLOWEDOK
AGPL-3.0-*ALLOWED-WITH-CAVEATOK
SSPL-1.0, BUSL-1.1, Commons-ClauseBLOCKED--
RH-owned proprietaryESCALATE-TO-LEGAL--
Third-party proprietary (no vendor agreement)ESCALATE-TO-LEGAL--
PyPI/repo license mismatchper repo license (MISMATCH noted)OK
No buildable sourceper licenseFLAG

Error Handling

  • Fedora data unreachable: Use fallback table; append note.
  • Source repo not found: If python-packaging-source-finder returns null/low confidence, set Source verified: NO, verdict: NEEDS-HUMAN-REVIEW.
  • Source repo private/inaccessible: Set Source verified: NO. Verdict: NEEDS-HUMAN-REVIEW.
  • Multiple conflicting LICENSE files: Source verified: MISMATCH, verdict: NEEDS-HUMAN-REVIEW. Note the conflicting files.

Foire aux questions

À quoi sert la compétence IA Python Packaging License Checker ?

Use this skill to check whether a Python package license is compatible with redistribution in Red Hat products, using the Fedora License Data as the authoritative policy source. Produces a structured six-field verdict with escalation guidance for non-trivial cases.

Pourquoi utiliser Python Packaging License Checker sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Python Packaging License Checker se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Python Packaging License Checker dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-python-packaging/skills/python-packaging-license-checker. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Python Packaging License Checker ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Python Packaging License Checker ?

Autant que vous le souhaitez. Vous pouvez utiliser Python Packaging License Checker avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Python Packaging License Checker est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par opendatahub-io sous licence Apache-2.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇