Uses new pyvenv brewkit machinery (#4714)

This commit is contained in:
Max Howell 2024-01-04 07:06:19 +00:00 committed by GitHub
parent b3b2b4be44
commit 270565f87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 24 deletions

View file

@ -1,10 +1,4 @@
#!/usr/bin/env -S tea bash #!/usr/bin/env -S pkgx +gum bash
# shellcheck shell=bash
#---
# dependencies:
# charm.sh/gum: '*'
#---
set -eo pipefail set -eo pipefail

View file

@ -10,35 +10,29 @@ versions:
display-name: GPT Engineer display-name: GPT Engineer
dependencies: dependencies:
python.org: '~3.11' pkgx.sh: ^1
tea.xyz: ^0
entrypoint: tea ./entrypoint.sh entrypoint: pkgx ./entrypoint.sh
build: build:
dependencies: dependencies:
gnu.org/patch: '*' python.org: ~3.11
python-poetry.org: '*' python-poetry.org: ^1.7
script: script:
# https://github.com/AntonOsika/gpt-engineer/issues/204 # https://github.com/AntonOsika/gpt-engineer/issues/204
- run: patch -p1 < props/main.py.patch - run: patch -p1 < props/main.py.patch
if: =0.0.3 if: =0.0.3
# https://github.com/python-poetry/poetry/issues/1937#issuecomment-983754739
- run: | - run: |
poetry config virtualenvs.create true bkpyvenv stage --engine=poetry {{prefix}} {{version}}
poetry config virtualenvs.in-project true
poetry install --with=experimental poetry install --with=experimental
poetry build -f sdist bkpyvenv seal --engine=poetry {{prefix}} gpt-engineer
tar zxvf dist/gpt_engineer-{{version}}.tar.gz -C .venv/lib/python3.11/site-packages --strip-components=1
mkdir -p "{{prefix}}"
export VIRTUAL_ENV="{{prefix}}/venv"
cp -a .venv "$VIRTUAL_ENV"
cp pyproject.toml "$VIRTUAL_ENV"
python-venv-stubber.sh gpt-engineer
if: '>=0.2.1' if: '>=0.2.1'
- run: python-venv.sh {{prefix}}/bin/gpt-engineer - run: |
bkpyvenv stage {{prefix}} {{version}}
{{prefix}}/venv/bin/pip install .
bkpyvenv seal {{prefix}} gpt-engineer
if: '<0.2.1' if: '<0.2.1'
# https://github.com/AntonOsika/gpt-engineer/issues/204 # https://github.com/AntonOsika/gpt-engineer/issues/204
@ -52,4 +46,8 @@ provides:
test: test:
qa-required: true qa-required: true
script: gpt-engineer --help script:
- gpt-engineer --help
# verifies that python cannot have been available to gpt-engineer in any
# other way than via pkgx in the commands pkgx shim
- if command -v python; then exit 1; fi