-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[workspace] Create a virtual environment for MacOS Python deps. #21269
[workspace] Create a virtual environment for MacOS Python deps. #21269
Conversation
@jwnimmer-tri and @svenevs I think this is a simple approach, and I added a comment so that there is a bit of a paper trail. It may not be necessary. I think there are other approaches particularly with respect to control flow, but |
4b54f09
to
f0bfb8b
Compare
Thanks, I will take a look in 2-3 weeks, but I'm short on time these days. One big-picture problem: we must allow for the possibility of multiple different binary installs of Drake (at different versions) that are all independent (don't share a venv), and likewise we must allow for multiple different source checkouts of drake (at different versions) that are all independent (don't share a venv). One way or another, the venv need to be somehow related to the particular copy of (i.e., path to) Drake that it's associated with. That might mean we need different techniques for binary vs source prereqs, I don't know. I'll also note this comment from #8392:
It possible / probable that source The main work of #8392 is not the writing of a few lines of code, it's studying the several possible approaches, understanding their pros and cons, and choosing which mechanism to use. |
On this, I totally agree. The initial work here was meant to be a forcing function for me to outline the pros and cons with data more than anything else at this stage. It will take me ~2-3 weeks to outline what I perceive about the different challenges and approaches between homebrew, venv, and pipx. I do have some of the data noted but I still need to spend time working through it to make it presentable. I consulted some Python experts on this one as I am more of a systems programming and databases person day-to-day. With open source, everyone needs to pitch in across skillsets and organizations, though. I have a few clean Mac machines to work through as well. Your comments have given me some clarity on the goals to inform my proposed approach. Thank you. |
Assigning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, missing label for release notes (waiting on @MarcusSorealheis)
I'm still learning a lot and have a lot more studying to do, but preliminarily your intuition is correct @jwnimmer-tri with respect to the source distribution. The only risk I see right now is two install paths ( Using
I'm going to update this PR to include this approach and try it out so that everyone can get a sense for what the implementation might look like. The goal is more reproducibility and usability. As a part of adding |
Here is a note for posterity. Nothing more: I just checked the
Looks like the project will only need to support Apple Silicon going forward. |
To be very clear, the macOS x86 wheel builds are still currently supported and will need a python venv during the build. Happily, the wheel builds already handle their own venv setup so are out of scope for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, missing label for release notes (waiting on @MarcusSorealheis)
Closing as stale. I have new details at #8392 (comment) which Kitware is planning to carry forward for us. |
This Pull Request creates a virtual environment for Python dependencies on MacOS so that we can remove the
--break-system-packages
argument to thepip install
invocation. It fixes: #8392This change is