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

Introduce --non-hermetic-venv-scripts. #2068

Merged
merged 2 commits into from
Feb 26, 2023
Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Feb 25, 2023

This provides the same option when building a PEX as the
--non-hermetic-scripts does when creating a venv from a PEX using
pex-tools. In addition, both means of creating a non-hermetic venv
are extended to the venv pex script itself.

Closes #2065

This provides the same option when building a PEX as the
`--non-hermetic-scripts` does when creating a venv from a PEX using
`pex-tools`. In addition, both means of creating a non-hermetic venv
are extended to the venv `pex` script itself.

Closes pex-tool#2065
# type: (Any) -> None

# A console script that injects an element in the PYTHONPATH.
ot_simulator_src = os.path.join(str(tmpdir), "src")
Copy link
Member Author

Choose a reason for hiding this comment

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

As named, this simulates OpenTelemetry auto-instrumentation - actually turning the manual test detailed here #2065 (comment) into an IT seemed too fragile / likely flaky.

@@ -190,7 +191,12 @@ def create_sh_boot_script(
# interpreter to use is embedded in the shebang of our venv pex script; so just
# execute that script directly.
export PEX="$0"
exec "${{INSTALLED_PEX}}/bin/python" -sE "${{INSTALLED_PEX}}" "$@"
Copy link
Member Author

Choose a reason for hiding this comment

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

I had missed this 1 spot. That's the last.

@jsirois jsirois merged commit 9c972c2 into pex-tool:main Feb 26, 2023
@jsirois jsirois deleted the issues/2065 branch February 26, 2023 17:36
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.

Pex files do not allow for OpenTelemetry auto-instrumentation
2 participants