Skip to content
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

Disable sitecustomize paths if in virtual env #623

Merged
merged 3 commits into from
Jun 13, 2024

Commits on Mar 7, 2024

  1. Disable sitecustomize paths if in virtual env

    Luka Juricic committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    3d14b8f View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. Configuration menu
    Copy the full SHA
    d95da69 View commit details
    Browse the repository at this point in the history
  2. Override sys.prefix only if it hasn't been changed

    The purpose of the sitecustomize here is to make setuptools install
    stuff to our prefix instead of the global prefix, and to appear enough
    like a virtual environment that platform-specific patches to sysconfig
    don't interfere with that effort.
    
    It isn't inconceivable that there may be subprocesses involved in the
    build, and we want any installation happening in those subprocesses to
    also get the redirect, and that currently works as expected as long as
    the sitecustomize directory remains on PYTHONPATH somewhere.
    
    However, if some subprocess is also modifying sys.path, as would be the
    case if a subprocess was using a new virtual environment, we don't want
    to override those changes. Since we know what sys.prefix was when colcon
    was invoked, we can just check to see if it changed.
    cottsay committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    dd58dfc View commit details
    Browse the repository at this point in the history