+pip.pypa.io

This commit is contained in:
Jacob Heider 2022-10-27 00:36:26 -04:00 committed by Jacob Heider
parent 1b2738fbf2
commit ae4224d10c
2 changed files with 43 additions and 13 deletions

View file

@ -0,0 +1,41 @@
distributable:
url: https://github.com/pypa/pip/archive/refs/tags/{{version.raw}}.tar.gz
strip-components: 1
versions:
github: pypa/pip/tags
dependencies:
python.org: ^3.7
build:
dependencies:
curl.se: '*'
script: |
curl -O https://bootstrap.pypa.io/get-pip.py
test -d bootstrap || mkdir bootstrap
python get-pip.py --target="$(pwd)/bootstrap"
PYTHONPATH=$(pwd)/bootstrap python -m pip install . --target={{prefix}}
cd {{prefix}}
for binfile in $shebangs; do
sed -i.bak -e 's|#!{{ deps.python.org.prefix }}/bin/|#!/usr/bin/env |g' $binfile
rm $binfile.bak
done
rm bin/pip{{deps.python.org.version.major}}.{{deps.python.org.version.minor}}
env:
shebangs:
- bin/pip
- bin/pip{{deps.python.org.version.major}}
test:
script: |
pip install findtui --target .
test -f findtui/main.py
provides:
- bin/pip
- bin/pip{{deps.python.org.version.major}}

View file

@ -22,9 +22,6 @@ dependencies:
gnu.org/readline: 8
invisible-island.net/ncurses: 6
#TODO pip should be python.org/pip and installed by default (as a recommended dependent) with python
#RATIONALE it is independently versioned
build:
dependencies:
tea.xyz/gx/cc: c99
@ -43,17 +40,11 @@ build:
# provide unversioned symlinks
cd {{prefix}}/bin
for x in python pip idle pydoc; do
for x in python idle pydoc; do
ln -sf ${x}{{ version.marketing }} $x
done
ln -sf python{{ version.marketing }}-config python-config
# strangely pip3 is a copy of pip3.10
if test ! -L pip{{version.major}}; then
rm pip{{version.major}}
ln -s pip{{version.marketing}} pip{{version.major}}
fi
# make relocatable
cd {{prefix}}
for binfile in $shebangs $confdir/python-config.py; do
@ -70,7 +61,7 @@ build:
# its 202x
- --enable-ipv6
# prevent auto updates -> we control that
# - --without-ensurepip
- --without-ensurepip
- --disable-loadable-sqlite-extensions
# use our libraries not the bundled ones
- --with-system-expat
@ -93,7 +84,6 @@ build:
shebangs:
- bin/2to3-{{version.marketing}}
- bin/idle{{version.marketing}}
- bin/pip{{version.marketing}}
- bin/pydoc{{version.marketing}}
- bin/python{{version.marketing}}-config
@ -125,4 +115,3 @@ test:
#TODO test all modules eg zlib module
script: |
python --version
pip --version