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

feat: switch to creation of venv without Python or pip #233

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

mattem
Copy link
Collaborator

@mattem mattem commented Dec 20, 2023

Switches creating the venv to a dedicated tool, removing the requirement for pip.

Venv is now created just before the binary or test runs, rather than as an action output. The overhead is minimal, venv creation and activation takes at most 7ms as observed during testing.

Closes #233
Closes #238
Closes #176
Closes #218
Closes #248
Closes #152
Closes #110

Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

to make things easier on reviewers, WDYT about making this PR just the introduction of the Rust code, binaries and the build mechanism? Then a follow-up for the starlark changes?

@mattem
Copy link
Collaborator Author

mattem commented Feb 8, 2024

If you want to review it that way, then ignore py/tools. However due to the toolchain additions, they are somewhat interleaved.

py/tools/py/Cargo.toml Show resolved Hide resolved
py/tests/virtual/django/BUILD.bazel Show resolved Hide resolved
py/private/py_binary.bzl Outdated Show resolved Hide resolved
py/private/py_semantics.bzl Show resolved Hide resolved
@mattem mattem merged commit ebabbaf into main Feb 15, 2024
2 checks passed
@mattem mattem deleted the pycrust branch February 15, 2024 16:42
@btobolaski btobolaski mentioned this pull request Feb 21, 2024
alexeagle added a commit that referenced this pull request Feb 21, 2024
### Type of change

- Refactor (a code change that neither fixes a bug or adds a new
feature)


### Test plan

- Covered by existing test cases

#233 was mentioned as a fix for #218 but #233 includes a dependency on
openssl. This dependency on openssl makes building containers on MacOS
difficult as we then need to cross build openssl. I see that there was
an attempt to remove the openssl dependency `rattler_installs_packages`
however, `native-tls` is in the default features and is the only default
feature. Disabling `default-features` removes the dependency on openssl.

---------

Co-authored-by: Alex Eagle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment