Skip to content

Conversation

@emmatyping
Copy link
Member

Description

This works around a change in virtualenv 20.x where the site-packages folder is added to the PYTHONPATH variable. We detect if the python executable is in a virtualenv by comparing the prefix and base prefix, and ignoring the issue if the site-package folder is under the virtualenv prefix.

This is an alternative to #10846

Fixes #10407

virtualenv>=20.6.0
setuptools!=50
importlib-metadata==0.20
importlib-metadata>=4.6.1,<5.0.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The very old version of this was causing a failure with the new virtualenv.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks for the fix!

@emmatyping emmatyping merged commit a1863c9 into master Jul 22, 2021
@emmatyping emmatyping deleted the fixvenv branch July 22, 2021 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Virtualenv pinned to <20

3 participants