Skip to content
Snippets Groups Projects
Commit 7515cf5e authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

chore: support auto value for $PYTHON_BUILD_SYSTEM

parent 8c8a873b
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ and/or `setup.py` and/or `requirements.txt`), but the build system might also be ...@@ -42,7 +42,7 @@ and/or `setup.py` and/or `requirements.txt`), but the build system might also be
| Value | Build System (scope) | | 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) | | `setuptools` | [Setuptools](https://setuptools.pypa.io/) (dependencies, build & packaging) |
| `poetry` | [Poetry](https://python-poetry.org/) (dependencies, build, test & packaging) | | `poetry` | [Poetry](https://python-poetry.org/) (dependencies, build, test & packaging) |
| `pipenv` | [Pipenv](https://pipenv.pypa.io/) (dependencies only) | | `pipenv` | [Pipenv](https://pipenv.pypa.io/) (dependencies only) |
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
"name": "PYTHON_BUILD_SYSTEM", "name": "PYTHON_BUILD_SYSTEM",
"description": "Python build-system to use to install dependencies, build and package the project", "description": "Python build-system to use to install dependencies, build and package the project",
"type": "enum", "type": "enum",
"values": ["", "setuptools", "poetry", "reqfile"], "values": ["auto", "setuptools", "poetry", "pipenv", "reqfile"],
"default": "auto",
"advanced": true "advanced": true
}, },
{ {
......
...@@ -215,30 +215,29 @@ variables: ...@@ -215,30 +215,29 @@ variables:
} }
function guess_build_system() { function guess_build_system() {
if [[ "$PYTHON_BUILD_SYSTEM" ]] case "${PYTHON_BUILD_SYSTEM:-auto}" in
then auto)
case "$PYTHON_BUILD_SYSTEM" in ;;
poetry) poetry)
log_info "--- Build system explictly declared: Poetry" log_info "--- Build system explictly declared: Poetry"
return return
;; ;;
setuptools) setuptools)
log_info "--- Build system explictly declared: Setuptools" log_info "--- Build system explictly declared: Setuptools"
return return
;; ;;
pipenv) pipenv)
log_info "--- Build system explictly declared: Pipenv" log_info "--- Build system explictly declared: Pipenv"
return return
;; ;;
reqfile) reqfile)
log_info "--- Build system explictly declared: requirements file" log_info "--- Build system explictly declared: requirements file"
return return
;; ;;
*) *)
log_warn "--- Unknown declared build system: \\e[33;1m${PYTHON_BUILD_SYSTEM}\\e[0m: please read template doc" log_warn "--- Unknown declared build system: \\e[33;1m${PYTHON_BUILD_SYSTEM}\\e[0m: please read template doc"
;; ;;
esac esac
fi
if [[ -f "pyproject.toml" ]] if [[ -f "pyproject.toml" ]]
then then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment