Skip to content

Tag v2 beta #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.1
2.0.0-beta.1
16 changes: 12 additions & 4 deletions build_defs/python.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,18 @@ def pip_library(name:str, version:str, hashes:list=None, package_name:str=None,
# Unfortunately it does *not* work similarly on the Debian problem :(
pip_cmd = 'echo "[install]\nprefix=" > setup.cfg; ' + pip_cmd
if CONFIG.OS == 'linux' and CONFIG.PYTHON.DISABLE_VENDOR_FLAGS == "false":
# Fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830892
# tl;dr: Debian has broken --target with a custom patch, the only way to fix is to pass --system
# which is itself Debian-specific, so we need to find if we're running on Debian. AAAAARGGGHHHH...
pip_cmd = f'[ -f /etc/debian_version ] && SYS_FLAG="--system" || SYS_FLAG=""; {pip_cmd} $SYS_FLAG'
# Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830892
#
# Version 8.1.2-1 of Debian's python3-pip package inverts pip's standard behaviour: --user becomes the default;
# a Debian-specific --system option reverts to upstream pip's default behaviour, and it must be passed in order
# to use the --target option. python3-pip 18.1-1 changes the behaviour again, implying --user only if --target
# is not passed and therefore removing the need to pass --system (although it can still be passed to guarantee
# upstream pip's behaviour). python3-pip 21.3.1-1 drops the --system option altogether, and passing it causes
# pip to exit with an error).
#
# The easiest way to deal with this mess is to test whether the pip_tool we're using implements --system, then
# to pass it in the real pip invocation if so.
pip_cmd = f'[ -f /etc/debian_version ] && {pip_tool} --system >/dev/null 2>&1 && SYS_FLAG="--system" || SYS_FLAG=""; {pip_cmd} $SYS_FLAG'

pip_cmd += f' {repo_flag} {index_flag} {pip_flags} {package_name}'

Expand Down