Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/). Les numéros

## [Non publié]

### Modifié
- Licence passée de MIT à GPL-3.0-or-later : texte officiel dans `LICENSE`, `license = "GPL-3.0-or-later"` (PEP 639, setuptools ≥ 77) et URLs du dépôt dans `pyproject.toml`, en-têtes SPDX dans les sources, section Licence du README (#68).

### Ajouté
- Règles de protection versionnées `.github/branch-protection/{main,dev}.json` (relevées sur la protection réelle du 22/10/2026), vérifiées par le workflow `branch-protection.yml` (push sur main/dev, chaque jour) et `scripts/check_branch_protection.py` (socle Mathilde-Team/.github#1, #61).

Expand Down
696 changes: 675 additions & 21 deletions LICENSE

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,22 @@ Roadmap d'intégration : [Gcm4 #106](https://github.com/MathildeDec/Gcm4/issues/
Tableau de bord : [Gcm4 #107](https://github.com/MathildeDec/Gcm4/issues/107)
Annonce du projet : [Gcm4 #103](https://github.com/MathildeDec/Gcm4/issues/103)
Liaison plugin : [Gcm4 #105](https://github.com/MathildeDec/Gcm4/issues/105)

---

## Licence

AsyncRdp4 est distribué sous **GNU General Public License v3.0 ou ultérieure** (`GPL-3.0-or-later`) : voir [`LICENSE`](./LICENSE). Chaque fichier source porte l'en-tête `SPDX-License-Identifier: GPL-3.0-or-later`.

Dépendances (licences compatibles avec la GPLv3) :

| Dépendance | Licence |
| --- | --- |
| libfreerdp3 (FreeRDP, bibliothèque système) | Apache-2.0 |
| GTK 4 (bibliothèque système, extra `gtk4`) | LGPL-2.1-or-later |
| cffi | MIT-0 |
| loguru | MIT |
| PyGObject (extra `gtk4`) | LGPL-2.1-or-later |
| numpy (extra `gtk4`) | BSD-3-Clause (et licences permissives associées) |
| pyusb (extra `usb`) | BSD-3-Clause |
| gbulb, Pillow (tests GTK4 uniquement) | Apache-2.0, MIT-CMU |
1 change: 1 addition & 0 deletions build_ffi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
build_ffi.py — build cffi en mode API (out-of-line), pas ABI/dlopen.

Expand Down
1 change: 1 addition & 0 deletions build_gir.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
build_gir.py — build de integrations/gtk4/native/, une petite bibliothèque
GObject Introspection écrite en C pur, distincte du binding cffi principal
Expand Down
1 change: 1 addition & 0 deletions examples/probe_rdpdr_devices.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""
probe_rdpdr_devices.py — annonce une imprimante, un port série, un port
parallèle et un disque à un serveur RDP, puis se déconnecte.
Expand Down
1 change: 1 addition & 0 deletions examples/test_connect_full.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""
test_connect_full.py — test manuel plus complet qu'test_connect_minimal.py :
en plus de la connexion de base, exerce clipboard (texte), clavier/souris,
Expand Down
1 change: 1 addition & 0 deletions examples/test_connect_minimal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""
test_connect_minimal.py — premier test manuel, volontairement réduit au
strict nécessaire : connexion, quelques frames, déconnexion propre. Pas
Expand Down
1 change: 1 addition & 0 deletions examples/test_full_suite.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""
test_full_suite.py — script de test complet, consolidant toute la campagne
de validation menée contre un vrai serveur RDP (xrdp) : connexion de base,
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# install.sh — installe les dépendances système puis le package asyncrdp
# (via uv, cf. migration du 2026-09-15 — voir docs/sessions/session-28.md).
#
Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/gcm_gtk4_asyncio.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Boucle asyncio intégrée à la boucle GLib d'une Gtk.Application.

Deux intégrateurs possibles, choisis à l'exécution :
Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/gcm_gtk4_clipboard_bridge.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
gcm_gtk4_clipboard_bridge.py

Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/gcm_gtk4_demo_viewer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""
gcm_gtk4_demo_viewer.py

Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/gcm_gtk4_display_bridge.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
gcm_gtk4_display_bridge.py

Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/gcm_gtk4_rdp_session.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
gcm_gtk4_rdp_session.py

Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/native/asyncrdp-image-provider.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* asyncrdp-image-provider.c — voir asyncrdp-image-provider.h pour le
* contexte complet et la raison d'être de ce fichier. */
#include "asyncrdp-image-provider.h"
Expand Down
1 change: 1 addition & 0 deletions integrations/gtk4/native/asyncrdp-image-provider.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* asyncrdp-image-provider.h
*
* GdkContentProvider écrit en C pur, pas en sous-classe PyGObject.
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=68", "cffi>=1.15.0"]
requires = ["setuptools>=77", "cffi>=1.15.0"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -8,7 +8,8 @@ version = "0.1.0"
description = "Binding asyncio sur libfreerdp3 (RDP) via cffi — équivalent RDP d'asyncvnc2"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
authors = [
{ name = "Mathilde" },
]
Expand Down Expand Up @@ -44,8 +45,8 @@ usb = ["pyusb>=1.2.0"]
test = ["pytest>=7.0", "pytest-asyncio>=0.21", "pytest-cov>=7.1.0"]

[project.urls]
Homepage = "https://github.com/<votre-compte>/asyncrdp"
Documentation = "https://github.com/<votre-compte>/asyncrdp/blob/main/README.md"
Homepage = "https://github.com/Mathilde-Team/AsyncRdp4"
Documentation = "https://github.com/Mathilde-Team/AsyncRdp4/blob/main/README.md"

[dependency-groups]
# Outillage de développement (jamais installé chez un utilisateur final du
Expand Down
1 change: 1 addition & 0 deletions scripts/audit_debug_sorties.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""Audit de la consigne « debug en entrée et à chaque sortie » (SOCLE §8).

Le socle Mathilde-Team (Mathilde-Team/.github#10) demande au moins deux
Expand Down
1 change: 1 addition & 0 deletions scripts/check_branch_protection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""Compare la protection réelle d'une branche à la règle versionnée.

Règle : .github/branch-protection/<branche>.json (format de l'API GitHub
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
setup.py minimal : le reste de la métadonnée du package vit dans
pyproject.toml (PEP 621) — ce fichier n'existe que parce que le mécanisme
Expand Down
1 change: 1 addition & 0 deletions src/asyncrdp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
asyncrdp — binding asyncio sur libfreerdp3 via cffi (mode API).

Expand Down
1 change: 1 addition & 0 deletions src/asyncrdp/_core.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
asyncrdp — binding asyncio sur libfreerdp3 via cffi (mode API).

Expand Down
1 change: 1 addition & 0 deletions src/asyncrdp/_shim.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
* asyncrdp_shim.c
*
Expand Down
1 change: 1 addition & 0 deletions src/asyncrdp/tracing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
tracing.py — décorateur de traçabilité entrée/sortie, systématique.

Expand Down
1 change: 1 addition & 0 deletions src/asyncrdp/usb.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
usb.py — énumération des périphériques USB locaux (libusb, via pyusb) et
construction des chaînes de sélection attendues par `RdpOptions.usb_devices`
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
conftest.py — fixtures partagées.

Expand Down
1 change: 1 addition & 0 deletions tests/gtk_stub/asyncrdp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
Faux module `asyncrdp` pour `tests/gtk_stub/` — évite de dépendre du
binding cffi compilé (`_asyncrdp_cffi`, nécessite FreeRDP3 installé +
Expand Down
1 change: 1 addition & 0 deletions tests/gtk_stub/gi/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Faux paquet `gi` — voir gi/repository.py pour le détail."""
1 change: 1 addition & 0 deletions tests/gtk_stub/gi/repository.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
Stub minimal de `gi.repository` pour tester la logique pure des ponts
GTK4 de asyncrdp (`integrations/gtk4/*.py`) sans GTK4 installé ni
Expand Down
1 change: 1 addition & 0 deletions tests/test_core_contexte.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de `_core.py` sur un vrai contexte FreeRDP, sans serveur (issue #50).

`asyncrdp_context_new()` crée un vrai `rdpContext` (libfreerdp3) sans se
Expand Down
1 change: 1 addition & 0 deletions tests/test_core_doublure.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de `_core.py` côté Python, avec une doublure du shim C (issue #50, palier 2).

Les classes `Keyboard`, `Mouse`, `Clipboard`, `Client`, les callbacks
Expand Down
1 change: 1 addition & 0 deletions tests/test_file_group_descriptor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests unitaires du format FileGroupDescriptorW (MS-RDPECLIP §2.2.5.2.3) —
la partie clipboard fichiers la plus délicate à avoir bien codée (calcul
Expand Down
1 change: 1 addition & 0 deletions tests/test_gtk4_bridges.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_gtk4_bridges.py — logique pure des ponts GTK4
(`integrations/gtk4/gcm_gtk4_display_bridge.py` et
Expand Down
1 change: 1 addition & 0 deletions tests/test_gtk4_clipboard_file_download.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_gtk4_clipboard_file_download.py — logique pure du téléchargement
RDP -> local du pont presse-papier GTK4
Expand Down
1 change: 1 addition & 0 deletions tests/test_gtk4_demo_viewer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_gtk4_demo_viewer.py — logique pure de l'assemblage GTK4 ajouté
le 2026-09-18 (gcm_gtk4_rdp_session.RdpSession, gcm_gtk4_demo_viewer.
Expand Down
1 change: 1 addition & 0 deletions tests/test_gtk4_live.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests « live » des vrais ponts GTK4 (integrations/gtk4/gcm_gtk4_*_bridge.py)
— PAS les doublures de tests/gtk_stub/. Contrairement à test_gtk4_bridges.py
Expand Down
1 change: 1 addition & 0 deletions tests/test_integration_live.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests d'intégration — nécessitent un vrai serveur RDP accessible.

Expand Down
37 changes: 37 additions & 0 deletions tests/test_licence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Vérifie la licence GPL-3.0-or-later du dépôt (issue #68)."""

import re
import subprocess
from pathlib import Path

RACINE = Path(__file__).resolve().parent.parent
SPDX = "SPDX-License-Identifier: GPL-3.0-or-later"
EXTENSIONS = (".py", ".sh", ".c", ".h", ".rules")


def test_fichier_license_gplv3():
texte = (RACINE / "LICENSE").read_text(encoding="utf-8")
assert texte.lstrip().startswith("GNU GENERAL PUBLIC LICENSE")
assert "Version 3, 29 June 2007" in texte


def test_pyproject_declare_gpl():
# Lecture textuelle : tomllib n'existe qu'à partir de Python 3.11.
texte = (RACINE / "pyproject.toml").read_text(encoding="utf-8")
assert re.search(r'^license = "GPL-3\.0-or-later"$', texte, re.MULTILINE)
assert "<votre-compte>" not in texte


def test_entetes_spdx():
fichiers = subprocess.run(
["git", "ls-files"], cwd=RACINE, capture_output=True, text=True, check=True
).stdout.split()
manquants = []
for nom in fichiers:
if nom.startswith("docs/") or not nom.endswith(EXTENSIONS):
continue
tete = (RACINE / nom).read_text(encoding="utf-8").splitlines()[:3]
if not any(SPDX in ligne for ligne in tete):
manquants.append(nom)
assert manquants == []
1 change: 1 addition & 0 deletions tests/test_loguru_regles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Règles loguru vérifiées par AST (SOCLE §8, modèle : Gcm4
``tests/test_loguru_regles.py``).

Expand Down
1 change: 1 addition & 0 deletions tests/test_no_circular_imports.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_no_circular_imports.py — absence de cycle d'imports entre les
modules internes du projet (`src/asyncrdp/`, `integrations/gtk4/`).
Expand Down
1 change: 1 addition & 0 deletions tests/test_rdp_options.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests unitaires des dataclasses de configuration — construction, valeurs
par défaut, pas d'appel réseau. RdpOptions._apply() (qui parle au shim C)
Expand Down
1 change: 1 addition & 0 deletions tests/test_tracing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_tracing.py — vérifie le décorateur `asyncrdp.tracing.traced`
en isolation, avec des fonctions/classes fabriquées pour l'occasion —
Expand Down
1 change: 1 addition & 0 deletions tests/test_usb.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""
test_usb.py — tests de `asyncrdp.usb`.

Expand Down
1 change: 1 addition & 0 deletions udev/70-asyncrdp-usb.rules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# 70-asyncrdp-usb.rules
#
# Contexte (voir docs/features-backlog.md, section USB) : sans cette
Expand Down
Loading