distributable:
  url: https://github.com/AntonOsika/gpt-engineer/archive/refs/tags/v{{version}}.tar.gz
  strip-components: 1

versions:
  github: AntonOsika/gpt-engineer

display-name: GPT Engineer

dependencies:
  python.org: '>=3<3.12'
  tea.xyz: ^0

entrypoint: tea ./entrypoint.sh

build:
  dependencies:
    gnu.org/patch: '*'
  script:
    # https://github.com/AntonOsika/gpt-engineer/issues/204
    - run: patch -p1 < props/main.py.patch
      if: =0.0.3

    - python-venv.sh {{prefix}}/bin/gpt-engineer

    # https://github.com/AntonOsika/gpt-engineer/issues/204
    - run: cp -a identity {{prefix}}
      if: =0.0.3

    - cp props/entrypoint.sh {{prefix}}

provides:
  - bin/gpt-engineer

test:
  qa-required: true
  script: gpt-engineer --help
