Skip to content

Infra : packaging unifié dans pyproject.toml + extra [p24] (#19) - #27

Closed
mickaelbegon wants to merge 1 commit into
mainfrom
infra/19-packaging
Closed

mickaelbegon wants to merge 1 commit into
mainfrom
infra/19-packaging

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Part of #19 (volet packaging). Le volet nettoyage du dépôt est dans #28.

Changements

  • Suppression de setup.py : tout est dans pyproject.toml (backend hatchling), qui devient la source unique de version. docs/conf.py lit désormais la version dans pyproject.toml au lieu de la dupliquer.
  • Suppression de la section [tool.setuptools] (ignorée par hatchling) ; contenu du wheel/sdist déclaré explicitement (pysciencemode/ uniquement), pour ne pas embarquer le .whl commité, les exemples ni les tests.
  • Nouvel extra p24 = ["cffi"] : pip install "pysciencemode[p24]". Le wheel sciencemode_cffi reste à installer à part : il n'est pas sur PyPI et n'est pour l'instant disponible que pour Windows / CPython 3.10 (voir [Roadmap] Wheels multiplateforme pour le P24 (Windows / Linux / macOS Intel+ARM) #1).
  • Dépendances : colorama retiré (importé nulle part) de pyproject.toml et environment.yml.
  • docs/requirements.txt : serial → pyserial.
  • README / docs/install.md : python setup.py install (obsolète) remplacé par pip install ., ajout de l'extra [p24] et de la mention Windows/Py3.10.

Vérifications

Dans un venv temporaire :

  • pip install -e ".[p24]" OK, importlib.metadata.requires → crccheck, numpy, pyserial, cffi; extra == 'p24'
  • python -m build OK ; wheel et sdist ne contiennent que le paquet + README/LICENSE/pyproject.

Points à valider

🤖 Generated with Claude Code

- Remove setup.py (duplicate metadata/version); pyproject.toml is now the
  single source, and docs/conf.py reads the version from it.
- Drop the unused [tool.setuptools] section (build backend is hatchling);
  declare wheel/sdist contents explicitly so the committed .whl, examples
  and tests are not shipped.
- Add optional extra `p24 = ["cffi"]`; the sciencemode_cffi wheel itself
  remains a separate, Windows/CPython 3.10-only install (see #1).
- Drop colorama, which is not imported anywhere.
- docs/requirements.txt: `serial` -> `pyserial`.
- Update README and docs/install.md install instructions (pip install .,
  [p24] extra) instead of the deprecated `python setup.py install`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mickaelbegon

Copy link
Copy Markdown
Owner Author

Déplacée sur upstream : s2mLab#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant