#!/usr/bin/env python """ This file is in the public domain. Execute pip3 in the right environment and the right parameters to install this package in the correct path. This is not a common use-case for pip, and thus it needs some hand-holding. """ import sys import os prefix_path = "%s/lib/python%d.%d/site-packages" % ( "@prefix@", sys.version_info.major, sys.version_info.minor) current_paths = os.environ.get("PYTHONPATH", "").split(":") current_paths.append(prefix_path) current_paths = [x for x in current_paths if x != ""] os.environ["PYTHONPATH"] = ":".join(current_paths) args = ["pip3", "install", '--install-option=--prefix=%s' % "@prefix@", "-e", "."] if "@DEBIAN_PIP3_SYSTEM@": args.push("@DEBIAN_PIP3_SYSTEM@") os.execvp("pip3", args)