---
include:
  - local: python/collections/all.yml
  - local: python/deployment/pyinstaller.yml
  - local: project-automation/workflow.yml

variables:
  PYTHON_CONTEXT: tests/mockup_projects/python/pep518
  PYINSTALLER_TARGET: tests/mockup_projects/python/pep518/mymodule.spec

python:build:setuptools:
  extends: python:build
  variables:
    PYTHON_CONTEXT: tests/mockup_projects/python/setuptools

python:twine:
  rules:
    - when: never

python:pylint:
  variables:
    PYLINT_EXTRA_OUTPUT_FORMATS: text:/tmp/pylint.txt
  rules:
    - if: "$PYVERSION == '3.8-slim'"
      variables:
        JOB_PACKAGE: pylint pylint-junit<0.3.4 pylint-gitlab # https://github.com/rasjani/pylint_junit/issues/8

# Testing pyinstaller for Windows is disabled: the job is no longer supported.
# The template itself is kept in python/deployment/pyinstaller.yml for existing users.
python:pyinstaller:windows:
  rules:
    - when: never

python:pyclean:failed:
  extends: python:pycln
  variables:
    CI_JOB_STATUS: failed
