diff --git a/README.md b/README.md index cc1e8ad34dc6417ece1ccbb5e3246685a4b35112..664e10814682e9ae1ec8f4362745f3382a26ee01 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Default configuration follows [this Python project structure](https://docs.pytho The Python template supports [Poetry](https://python-poetry.org/) as packaging and dependency management tool. If a `pyproject.toml` and `poetry.lock` file is detected at the root of your project structure, requirements will automatically be generated from Poetry. +Poetry support is disabled if `PYTHON_POETRY_DISABLED` has a value. :warning: as stated in [Poetry documentation](https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control), _You should commit the `poetry.lock` file to your project repo so that all people working on the project are locked to the same versions of dependencies_. diff --git a/kicker.json b/kicker.json index 4bbcde2aaec162e0646502fb259f540ec219558b..8d23974b51fa5f14e717e19aed918d1da69ebfb6 100644 --- a/kicker.json +++ b/kicker.json @@ -30,6 +30,12 @@ "name": "PIP_OPTS", "description": "pip extra [options](https://pip.pypa.io/en/stable/reference/pip/#general-options)", "advanced": true + }, + { + "name": "PYTHON_POETRY_DISABLED", + "description": "Disable poetry support", + "type": "boolean", + "advanced": true } ], "features": [ @@ -169,7 +175,12 @@ { "name": "RELEASE_VERSION_PART", "type": "enum", - "values": ["", "major", "minor", "patch"], + "values": [ + "", + "major", + "minor", + "patch" + ], "description": "The part of the version to increase (one of: `major`, `minor`, `patch`)", "default": "minor", "advanced": true @@ -221,4 +232,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml index a167d4bec403dbd0e69e996f94b0878e095c14b7..dd5a5c6f2540c883a2e21a941c1753e35c0c77ea 100644 --- a/templates/gitlab-ci-python.yml +++ b/templates/gitlab-ci-python.yml @@ -70,7 +70,7 @@ variables: } function install_test_requirements() { - if [[ -f "pyproject.toml" ]]; then + if [[ -f "pyproject.toml" ]] && [[ -z "${PYTHON_POETRY_DISABLED}" ]]; then if [[ ! -f "poetry.lock" ]]; then log_error "Poetry detected but \\e[33;1mpoetry.lock\\e[0m file not found: you shall commit it with your project files" exit 1