Commit c46d5437 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

remove python version

parent 61a33165
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
  # Ruff version.
  rev: v0.9.9
  hooks:
    # Run the linter.
    - id: ruff
      args: [ --fix ]
    # Run the formatter.
    - id: ruff-format
+0 −60
Original line number Diff line number Diff line
install:  ## Installation en développement, à n'exécuter qu'une fois
	uv sync
	uv run pre-commit install
.PHONY:install

locales:  ## générer les fichiers de traductions
	msgfmt -o src/climax/locales/fr/LC_MESSAGES/messages.mo src/climax/locales/fr/LC_MESSAGES/messages.po
	msgfmt -o src/climax/locales/en/LC_MESSAGES/messages.mo src/climax/locales/en/LC_MESSAGES/messages.po
.PHONY:locales

clean:
	rm -rf dist
	rm -rf build
.PHONY:clean

build:locales  ## construire les paquets pour pypi
	rm -rf dist
	rm -rf build
	uv build
.PHONY:build

publish:build ## distribuer le paquet sur pypi
	uv publish
.PHONY:publish

macos:locales  ## construire le paquet pour MacOS
	rm -rf dist
	rm -rf build
	uv run pyinstaller src/climax.py --strip --noconfirm --collect-submodules shellingham --collect-submodules urllib
	mkdir dist/climax/_internal/climax
	mkdir dist/climax/_internal/climax/locales
	cp -r src/climax/locales/* dist/climax/_internal/climax/locales/
	cp src/climax/max_releases.json dist/climax/_internal/climax/max_releases.json
	cp src/env dist/climax/env
	tar -cvzf dist/climax-macos_arm.tar.gz -C dist/climax .
.PHONY:macos

macosdistro:macos  ## distribuer la version pour macos
	scp dist/climax-macos_arm.tar.gz climaxdistro:/var/www/climax/climax-macos_arm.tar.gz
.PHONY:macosdistro

macosinstall:macos  ## installer le paquet macos localement
	mkdir -p "${HOME}/.climax/"
	cp -r dist/climax/* "${HOME}/.climax/"
.PHONY:macosinstall

format: ## Formatage des sources avec uv
	uv run ruff check --fix ./src/
	uv run ruff format ./src/
.PHONY: format

tests: ## Lancer les tests
	uv run python tests.py
.PHONY: tests

help: ## afficher l'aide
	@echo "\nChoisissez une commande. Les choix sont:\n"
	@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[0;36m%-12s\033[m %s\n", $$1, $$2}'
	@echo ""
.PHONY: help
+0 −8
Original line number Diff line number Diff line
# CLIMAX

Climax est un utilitaire en ligne de commande pour la gestion des projets [MaX v2](https://www.certic.unicaen.fr/max-v2/).

Pour la documentation utilisateur, voir https://www.certic.unicaen.fr/max-v2/climax/

Pour les développeurs, voir le [Makefile](https://git.unicaen.fr/pdn-certic/climax/-/blob/main/Makefile?ref_type=heads) 
(pré-requis: [uv](https://docs.astral.sh/uv/) et [gettext](https://www.gnu.org/software/gettext/) / msgfmt).
 No newline at end of file
+0 −50
Original line number Diff line number Diff line
[project]
name = "climax-CERTIC"
dynamic = ["version"]
description = "CLI tool for MaX, Le Moteur d'Affichage XML."
readme = "README.md"
license = {text = "CECILL-C"}
requires-python = ">= 3.9"
authors = [
    { name = "Mickaël Desfrênes", email = "mickael.desfrenes@unicaen.fr" }
]
maintainers = [
    { name = "Mickaël Desfrênes", email = "mickael.desfrenes@unicaen.fr" }
]
dependencies = [
    "typer>=0.15.1",
    "pyinstaller>=6.11.1",
    "requests>=2.32.3",
    "basexclient>=8.4.4",
    "beautifulsoup4>=4.12.3",
    "lxml>=5.3.0",
    "lxml-html-clean>=0.4.1",
    "geler-certic>=0.4.4",
    "bottle>=0.13.2",
    "oora>=0.2.6",
    "simple-term-menu>=1.6.6",
]

[dependency-groups]
dev = [
    "pre-commit>=4.1.0",
    "ruff>=0.9.2",
]

[project.scripts]
climax = 'climax.__main__:wrap_app_exceptions'

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/climax"]

[tool.hatch.build.targets.src]
packages = ["src/climax"]

[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
path = "src/climax/__init__.py"
+0 −4
Original line number Diff line number Diff line
from climax.__main__ import wrap_app_exceptions

if __name__ == "__main__":
    wrap_app_exceptions()
Loading