prefix-dev / rip

Solve and install Python packages quickly with rip (pip in Rust)
https://prefix.dev
BSD 3-Clause "New" or "Revised" License
653 stars 23 forks source link

Consider making PythonInterpreterVersion public API #155

Closed mattem closed 9 months ago

mattem commented 9 months ago

Hi, I'm a maintainer on the Bazel build system, and rules_py. I'm looking to make use of VEnv in the rattler_installs_packages crate.

We have a requirement where we are unable to call the Python interpreter to determine its version, however we already know the interpreters version statically ahead of time, but as PythonInterpreterVersion isn't public, we can't make use VEnv::create_pyvenv to workaround the version interrogation in VEnv::create_custom.

What are the thoughts around either moving PythonInterpreterVersion to the public API, or providing another function on VEnv that takes a version string or tuple?

tdejager commented 9 months ago

Sounds good! What would you prefer? Open to both:)

mattem commented 9 months ago

I think my preference would be making it public.

tdejager commented 9 months ago

Okay, if you want to make a PR go ahead! Otherwise I'll get to it the coming week :)

mattem commented 9 months ago

Great! I can put up a PR 👍

tdejager commented 9 months ago

Thanks for the PR 😀 !