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

Create venv purely from Rust #83

Closed
tdejager opened this issue Nov 20, 2023 · 2 comments · Fixed by #128
Closed

Create venv purely from Rust #83

tdejager opened this issue Nov 20, 2023 · 2 comments · Fixed by #128
Labels
good first issue Good for newcomers

Comments

@tdejager
Copy link
Contributor

tdejager commented Nov 20, 2023

FWIW, if you want to avoid the overhead of a subprocess call here, it's not particularly difficult to implement the logic for creating a virtual environment, especially given that you don't want to have any packages installed within it: https://peps.python.org/pep-0405/#creating-virtual-environments has the details (you don't really need activation files for your use case IIUC).

Originally posted by @pradyunsg in #82 (comment)

We can modify the venv module to be able to do this just from rust, and link the system intepreter into the virtual env.

@baszalmstra baszalmstra added the good first issue Good for newcomers label Nov 20, 2023
@nichmor
Copy link
Collaborator

nichmor commented Dec 16, 2023

Hi there!
I'm interested in tackling this issue.
Would it be possible for me to start working on it?
I've checked that it's not assigned to anyone, but I wanted to double-check with you.

Thank you!

@tdejager
Copy link
Contributor Author

tdejager commented Dec 16, 2023

Please go ahead! If you need any pointers let me know! I'm happy that you are willing to do this ☺️

tdejager pushed a commit that referenced this issue Dec 22, 2023
Create python venv directly from rust.

Implementation based on built-in venv module.

I've changed a little `system_python_executable` implementation. `which`
does not return original interpreter but a shim path when using pyenv.
This does not work well when we later create `pyenv.cfg` and set `home
=`



Closes: #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants