mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 04:25:08 +03:00
e4872f02d1
* Some older pipenv versions break with python 3.12 * pip was actually running via the vendored python pip site package and not ours :/
66 lines
1.6 KiB
YAML
66 lines
1.6 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/
|
||
|
||
companions:
|
||
pip.pypa.io: '*'
|
||
|
||
dependencies:
|
||
pkgx.sh: ^1
|
||
|
||
build:
|
||
dependencies:
|
||
python.org: ~3.11 # approx. 3 older versions won’t work with python 3.12
|
||
crates.io/semverator: '*'
|
||
script:
|
||
- bkpyvenv stage {{prefix}} {{version}}
|
||
- ${{prefix}}/venv/bin/pip install .
|
||
- bkpyvenv seal {{prefix}} 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
|
||
vMax=3.12 #FIXME determine dynamically or even script this in the shim
|
||
while semverator lt $v $vMax; do
|
||
v=$(semverator bump $v minor | cut -d. -f1,2)
|
||
echo '#!/bin/sh' > python$v
|
||
echo "exec pkgx python~$v \"\$@\"" >> python$v
|
||
chmod +x python$v
|
||
done
|
||
|
||
runtime:
|
||
env:
|
||
PIPENV_IGNORE_VIRTUALENVS: 1
|
||
|
||
test:
|
||
- pipenv --version
|
||
- pipenv --version 2>&1 | grep {{version}}
|
||
|
||
# changed to python3.8; 3.7 generates a lockfile resolver error
|
||
- run: |
|
||
pipenv --python 3.8
|
||
pipenv --verbose 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
|