fix python -m venv not providing pip

This commit is contained in:
Max Howell 2023-03-20 09:10:55 -04:00
parent 08dcacac17
commit 9600dcb047
4 changed files with 14 additions and 9 deletions

View file

@ -1,8 +1,7 @@
distributable:
url: https://github.com/npiv/chatblade/archive/refs/heads/main.zip
url: https://github.com/npiv/chatblade/archive/refs/heads/main.tar.gz
strip-components: 1
# if theres a github then we can parse the versions
versions:
- 0.0.0

View file

@ -1,7 +1,5 @@
distributable:
#FIXME: no tags/releases yet
# url: https://github.com/keephq/keep/archive/refs/tags/v{{ version }}.tar.gz
url: https://github.com/keephq/keep/archive/da7d4d419a275c629f3b9b6c05f8af81537bac3e.tar.gz
url: https://github.com/keephq/keep/archive/refs/heads/main.tar.gz
strip-components: 1
versions:

View file

@ -84,9 +84,16 @@ build:
sed -i.bak -e 's|{{ prefix }}|\\$(shell tea --prefix)/python.org/v{{version.major}}|g' $confdir/Makefile
rm $confdir/Makefile.bak
# force pip to user-install mode without sudo
ln -s /dev {{prefix}}/lib/python{{version.marketing}}/site-packages
# ^^ probs nuts lol, but the below has repurcussions
# chmod -w {{prefix}}/lib/python{{version.marketing}}
# ^^ makes rm -rf ~/.tea/python.org on macOS fail
env:
ARGS:
- --prefix="{{ prefix }}"
- --with-ensurepip
- --enable-ipv6
- --disable-loadable-sqlite-extensions
- --with-system-expat

View file

@ -1,10 +1,11 @@
import site
import sys
# tea considers /usr/local the “πglobal install” location
# setting this is kinda nuts but brew does the same so
# were assuming they vetted all options
sys.prefix = "/usr/local"
# tea considers /usr/local the “global install” location
# setting `sys.prefix` is kinda nuts but brew does the same
# so were assuming they vetted all options
# sys.prefix = "/usr/local"
# ^^ undid this because it broke `python -m venv` installing pip for some reason
# enable automatic user installs if pip makes the decision
# that this is good idea. eg. if /usr/local isnt writable