From a1b074aa0e2f5c6c4d45e683ad31d0033d3afa62 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Fri, 25 Oct 2024 11:36:42 +0200 Subject: [PATCH] =?utf8?q?D=C3=A9but=20de=20l'installation=20par=20pip=20d?= =?utf8?q?e=20CONFIGURATION=20(package=20salome=5Fconf)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .gitignore | 57 +++++++++++++++++++++++++++++++++++++++++++++++++- README_pypi.md | 24 +++++++++++++++++++++ pyproject.toml | 24 +++++++++++++++++++++ 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 README_pypi.md create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index c18dd8d..3590793 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,56 @@ -__pycache__/ +# Temporary and binary files +*~ +*.py[cod] +*.so +*.o +*.out +*.cfg +!.isort.cfg +!setup.cfg +*.orig +*.log +*.pot +__pycache__/* +.cache/* +.*.swp +*/.ipynb_checkpoints/* +.DS_Store + +# Project files +.ropeproject +.project +.pydevproject +.settings +.idea +.vscode +tags + +# Package files +*.egg +*.eggs/ +.installed.cfg +*.egg-info + +# Unittest and coverage +htmlcov/* +.coverage +.coverage.* +.tox +junit*.xml +coverage.xml +.pytest_cache/ + +# Build and docs folder/files +build/* +dist/* +sdist/* +docs/api/* +docs/_rst/* +docs/_build/* +cover/* +MANIFEST + +# Per-project virtualenvs +.venv*/ +.conda*/ +.python-version diff --git a/README_pypi.md b/README_pypi.md new file mode 100644 index 0000000..78ae6b6 --- /dev/null +++ b/README_pypi.md @@ -0,0 +1,24 @@ +Procédure d'installation du package salome-conf +=============================================== + +Prérequis +--------- + +Avoir le dernier tag Git au format X.Y.Z + +Procédure +--------- + +* Créer un environnement virtuel python + - python3 -m venv .venv + +* Activer le venv et mettre à jour pip et setuptools. Le package build peut aussi être installé pour la construction du wheel. + - source .venv/bin/activate + - python3 -m pip install -U pip setuptools build + +* Pour construire et installer le wheel de salome-conf (par défaut les fichiers .tar.gz et .whl sont produits dans le répertoire dist) + - python3 -m build -v + - python3 -m pip install dist/salome-conf-[XXX].whl + +* Pour installer salome-conf sans conserver le wheel + - python3 -m pip install . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b70c661 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[build-system] +requires = ["scikit-build-core"] +build-backend = "scikit_build_core.build" + +[project] +name = "salome_conf" +description = "Macros cmake pour la construction de composants SALOME." +license = {file = "COPYING"} +dependencies = [] +dynamic = ["version"] + +[tool.scikit-build] +cmake.version = ">=3.20" +cmake.build-type = "Release" +cmake.source-dir = "." +experimental = true +wheel.install-dir = "/data" +build-dir = "build/{wheel_tag}_{build_type}" + +[tool.scikit-build.metadata.version] +provider = "scikit_build_core.metadata.setuptools_scm" + +[tool.setuptools_scm] +# write_to = "src/salome_conf/_version.py" -- 2.39.2