From 936f64ec197d6b739cd618181eac9c3f8453ab7f Mon Sep 17 00:00:00 2001 From: dev_fb <frank.baier@swr.de> Date: Wed, 8 Jan 2025 16:49:58 +0100 Subject: [PATCH] Add pyproject.toml and GitLab CI for project setup Introduced a `pyproject.toml` file to define project metadata, dependencies, and Python version requirements. Added a `.gitlab-ci.yml` for automated builds and PyPI package uploads in the CI pipeline. --- .gitlab-ci.yml | 9 +++++++++ pyproject.toml | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 pyproject.toml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..95b3179 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +image: python:latest + +run-default: + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + script: + - pip install build twine + - python -m build + - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..edd3b33 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[project] +name = "python-mkp" +version = "0.6.0" +description = "Pack and unpack Check_MK mkp file" +readme = "README.md" +authors = [ + {name = "Thomas Reifenberger", email = "tom-mi@users.noreply.github.com"}, +] +dependencies = [ + "requests", + "lxml", + "zeep", + "pydantic[email]", + "pydantic-xml", +] +requires-python = ">= 3.10" -- GitLab