Skip to content
Snippets Groups Projects
Commit 1abb46a5 authored by Pierre SMEYERS's avatar Pierre SMEYERS
Browse files

Merge branch 'master' into 'master'

feat: add PYTHON_POETRY_EXTRAS support

Closes #5

See merge request to-be-continuous/python!4
parents e66945f9 e079e305
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,12 @@ 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_.
It uses the following variables:
| Name | description | default value |
| ------------------------ | ---------------------------------------------------------- | ----------------- |
| `PYTHON_POETRY_EXTRAS` | Poetry [extra sets of dependencies](https://python-poetry.org/docs/pyproject/#extras) to include, space separated | _none_ |
## Jobs
### Lint jobs
......
......@@ -36,6 +36,11 @@
"description": "Disable poetry support",
"type": "boolean",
"advanced": true
},
{
"name": "PYTHON_POETRY_EXTRAS",
"description": "Poetry [extra sets of dependencies](https://python-poetry.org/docs/pyproject/#extras) to include, space separated",
"advanced": true
}
],
"features": [
......@@ -232,4 +237,4 @@
]
}
]
}
\ No newline at end of file
}
......@@ -77,7 +77,7 @@ variables:
fi
log_info "--- Poetry detected: generating \\e[33;1m${TEST_REQUIREMENTS_FILE}\\e[0m from poetry.lock"
pip install poetry
poetry export --without-hashes --dev -f requirements.txt --output "${TEST_REQUIREMENTS_FILE}"
poetry export --without-hashes ${PYTHON_POETRY_EXTRAS:+--extras "$PYTHON_POETRY_EXTRAS"} --dev -f requirements.txt --output "${TEST_REQUIREMENTS_FILE}"
fi
if [[ -f "${TEST_REQUIREMENTS_FILE}" ]]; then
......@@ -97,7 +97,7 @@ variables:
fi
log_info "--- Poetry detected: generating \\e[33;1m${REQUIREMENTS_FILE}\\e[0m from poetry.lock"
pip install poetry
poetry export --without-hashes -f requirements.txt --output "${REQUIREMENTS_FILE}"
poetry export --without-hashes ${PYTHON_POETRY_EXTRAS:+--extras "$PYTHON_POETRY_EXTRAS"} -f requirements.txt --output "${REQUIREMENTS_FILE}"
fi
if [[ -f "${REQUIREMENTS_FILE}" ]]; then
......@@ -120,7 +120,7 @@ variables:
fi
log_info "--- Poetry detected: generating \\e[33;1m${TEST_REQUIREMENTS_FILE}\\e[0m from poetry.lock"
pip install poetry
poetry export --without-hashes -f requirements.txt --output "${DOCS_REQUIREMENTS_FILE}"
poetry export --without-hashes ${PYTHON_POETRY_EXTRAS:+--extras "$PYTHON_POETRY_EXTRAS"} -f requirements.txt --output "${DOCS_REQUIREMENTS_FILE}"
fi
if [[ -f "${DOCS_REQUIREMENTS_FILE}" ]]; 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