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

Use the current python interpreter for bootstrapping pip+venv #557

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

linsword13
Copy link
Collaborator

@linsword13 linsword13 commented Jul 10, 2024

Instead of hard-coding a list of paths, which is fragile and subject to
change. (For instance
#555.)

Also separate out the logic for getting the bootstrap python, and only
get it before use (instead of at init time.) This is to prep for more
complicated package manager flow (say spack+pip.)

@douglasjacobsen
Copy link
Collaborator

When we want to chain spack and pip as package managers, (i.e. spack_pip) do you envision that we would point bs_python at the spack installed python? And if so, do you think it's useful to have an interface to manipulate this, or should we just directly set it?

@douglasjacobsen
Copy link
Collaborator

And maybe building off of that, how do you see this behaving when bs_python changes during the execution of other package managers? (i.e. it's not known at init type)

@linsword13
Copy link
Collaborator Author

When we want to chain spack and pip as package managers, (i.e. spack_pip) do you envision that we would point bs_python at the spack installed python? And if so, do you think it's useful to have an interface to manipulate this, or should we just directly set it?

That's a great question (that I don't have a good immediate answer for.) I feel like I prefer the former (possibly via a directive.) Perhaps something analogous to how define_compiler works, and then the pip manager code will look for using the specified python. Need to hash out more details (like whether individual software_spec can use different pythons, and how to express the dependency of needing a spack environment first, etc.) though.

I am not sure I fully grasp your second question, do you have a rough example in mind?

Instead of hard-coding a list of paths, which is fragile and subject to
change. (For instance
GoogleCloudPlatform#555.)

Also separate out the logic for getting the bootstrap python, and only
get it before use (instead of at init time.) This is to prep for more
complicated package manager flow (say spack+pip.)
@douglasjacobsen douglasjacobsen self-assigned this Jul 10, 2024
@douglasjacobsen douglasjacobsen added the enhancement New feature or request label Jul 10, 2024
@linsword13 linsword13 merged commit 4f17c1e into GoogleCloudPlatform:develop Jul 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants