pantry/projects/pipenv.pypa.io/package.yml
Jacob Heider 7bf7b60ac7
fix(pipenv)
closes #3185
2023-09-01 19:10:30 +02:00

77 lines
1.8 KiB
YAML

distributable:
url: https://github.com/pypa/pipenv/archive/refs/tags/v{{ version }}.tar.gz
strip-components: 1
versions:
github: pypa/pipenv/releases/tags
strip: /^v/
dependencies:
tea.xyz: ^0
companions:
python.org: ^3.7
pip.pypa.io: '*'
build:
dependencies:
python.org: ^3.7
crates.io/semverator: '*'
script:
- python-venv.sh {{prefix}}/bin/pipenv
# create exec scripts for pipenv so it can auto install and use the pythons it wants
- working-directory:
${{prefix}}/bin
run: |
v=3.6
while semverator lt $v {{deps.python.org.version.marketing}}; do
v=$(semverator bump $v minor | cut -d. -f1,2)
echo '#!/bin/sh' > python$v
echo "exec tea python~$v \"\$@\"" >> python$v
chmod +x python$v
done
# so the venv for ourselves works without adding a specific python to
# our runtime dependencies
- working-directory:
${{prefix}}/bin
run: |
echo '#!/bin/sh' > python
echo "exec tea python~{{ deps.python.org.version.marketing }} \"\$@\"" >> python
chmod +x python
runtime:
env:
PIPENV_IGNORE_VIRTUALENVS: 1
test:
- run: |
if test {{version.major}} > 2000; then
VERSION=$(printf '%04d.%02d.%02d' {{version.major}} {{version.minor}} {{version.patch}})
else
VERSION={{version}}
fi
- pipenv --version | grep $VERSION
- run: |
pipenv --python 3.7
pipenv install pycowsay
pipenv run pycowsay "Hello World"
working-directory:
a
- run: |
pipenv --python 3.10
pipenv install pycowsay
pipenv run pycowsay "Hello World"
working-directory:
b
provides:
- bin/pipenv
marker-files:
- Pipfile
- Pipfile.lock
# TODO python version can be obtained from the Pipfile