diff --git a/README.md b/README.md index 4a47516e67c835ad0a716f76eb7e36a8332a2bbc..02f8d9f312575fcaeab3d553fe44e9403b4f0fdc 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ and/or `setup.py` and/or `requirements.txt`), but the build system might also be | Value | Build System (scope) | | ---------------- | ---------------------------------------------------------- | -| _none_ (default) | The template tries to **auto-detect** the actual build system | +| _none_ (default) or `auto` | The template tries to **auto-detect** the actual build system | | `setuptools` | [Setuptools](https://setuptools.pypa.io/) (dependencies, build & packaging) | | `poetry` | [Poetry](https://python-poetry.org/) (dependencies, build, test & packaging) | | `pipenv` | [Pipenv](https://pipenv.pypa.io/) (dependencies only) | diff --git a/kicker.json b/kicker.json index 35d8ab8205c40f7ae8fd23675b483055275fca2b..9c5a0583efc2821978e64ad618c3d0e85588e985 100644 --- a/kicker.json +++ b/kicker.json @@ -18,7 +18,8 @@ "name": "PYTHON_BUILD_SYSTEM", "description": "Python build-system to use to install dependencies, build and package the project", "type": "enum", - "values": ["", "setuptools", "poetry", "reqfile"], + "values": ["auto", "setuptools", "poetry", "pipenv", "reqfile"], + "default": "auto", "advanced": true }, { diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml index 9ac450376b4e088cded299d265a82fb57393be0d..4e08b3af0d28f93dfaeca21475947416a350a20c 100644 --- a/templates/gitlab-ci-python.yml +++ b/templates/gitlab-ci-python.yml @@ -215,30 +215,29 @@ variables: } function guess_build_system() { - if [[ "$PYTHON_BUILD_SYSTEM" ]] - then - case "$PYTHON_BUILD_SYSTEM" in - poetry) - log_info "--- Build system explictly declared: Poetry" - return - ;; - setuptools) - log_info "--- Build system explictly declared: Setuptools" - return - ;; - pipenv) - log_info "--- Build system explictly declared: Pipenv" - return - ;; - reqfile) - log_info "--- Build system explictly declared: requirements file" - return - ;; - *) - log_warn "--- Unknown declared build system: \\e[33;1m${PYTHON_BUILD_SYSTEM}\\e[0m: please read template doc" - ;; - esac - fi + case "${PYTHON_BUILD_SYSTEM:-auto}" in + auto) + ;; + poetry) + log_info "--- Build system explictly declared: Poetry" + return + ;; + setuptools) + log_info "--- Build system explictly declared: Setuptools" + return + ;; + pipenv) + log_info "--- Build system explictly declared: Pipenv" + return + ;; + reqfile) + log_info "--- Build system explictly declared: requirements file" + return + ;; + *) + log_warn "--- Unknown declared build system: \\e[33;1m${PYTHON_BUILD_SYSTEM}\\e[0m: please read template doc" + ;; + esac if [[ -f "pyproject.toml" ]] then