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
| 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) |
......
......@@ -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
},
{
......
......@@ -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
......
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