Skip to content

Commit

Permalink
Use --target instead of --prefix, when needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 committed May 13, 2023
1 parent c636309 commit 63a1259
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion kivy_ios/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,16 @@ def _pip(args):
pip_path = join(ctx.dist_dir, 'hostpython3', 'bin', 'pip3')

if len(args) > 1 and args[0] == "install":
pip_args = ["--isolated", "--prefix", ctx.python_prefix]
pip_args = ["--isolated"]

# --platform option requires --target, but --target can't be used
# with --prefix. We should prefer --prefix if it's possible,
# cause it notices already installed dependencies.
if "--platform" in args:
pip_args += ["--target", ctx.site_packages_dir]
else:
pip_args += ["--prefix", ctx.python_prefix]

args = ["install"] + pip_args + args[1:]

logger.info("Executing pip with: {}".format(args))
Expand Down

0 comments on commit 63a1259

Please sign in to comment.