Commit 7515cf5e authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

chore: support auto value for $PYTHON_BUILD_SYSTEM

parent 8c8a873b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) |
+2 −1
Original line number Diff line number Diff line
@@ -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
    },
    {
+23 −24
Original line number Diff line number Diff line
@@ -215,9 +215,9 @@ variables:
  }

  function guess_build_system() {
    if [[ "$PYTHON_BUILD_SYSTEM" ]]
    then
      case "$PYTHON_BUILD_SYSTEM" in
    case "${PYTHON_BUILD_SYSTEM:-auto}" in
    auto)
      ;;
    poetry)
      log_info "--- Build system explictly declared: Poetry"
      return
@@ -238,7 +238,6 @@ variables:
      log_warn "--- Unknown declared build system: \\e[33;1m${PYTHON_BUILD_SYSTEM}\\e[0m: please read template doc"
      ;;
    esac
    fi

    if [[ -f "pyproject.toml" ]]
    then