-
Notifications
You must be signed in to change notification settings - Fork 248
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
Allow Python to choose generator interpreter using shutil parameter t… #647
Conversation
Interesting design choice indeed. This looks like a great improvement. One question though. Do we ever need the old behavior or can we just skip the shutil parameter and always use the new mode? |
I would be quite happy with skipping the Also: Is a change breaking if no one depends on the behavior? It is probably fine to change the behavior and make a note that Python's |
Could you just quickly explain what would be the difference so that I don't misunderstand? If I understood correctly it would only affect Windows users, and would use the binary found with |
Yea, I kinda minddumped just to make sure I didn't forget to write stuff down. I've rearranged it into sections to hopefully make it more readable. General Problem
This is correct, w/ my bold tweaks. I want to clarify that My CaseOn my Windows system, the kernel's decision for which Let's Call This A Bug Fix
In both Windows and POSIX cases, the |
All good then. Just switch over unconditionally to the shutil behavior and I'll merge it. It's a bug fix! |
…which can find binaries that the system cannot. See Pythons Popen documentation.
Force-pushed (and tested on my end). Idk what the lint/pre-commit failure is from. Maybe it's transient? RtD build I assume you already know about and it'll be fixed when you get the chance :P. |
All good. Thanks for the fix. I found the cause of the linting failure. It's because I added a core description file with a yaml syntax error to check that FuseSoC handles that correctly and pre-commit picks it up as a real error. Doh! |
Yep. Fixed the lint issue. Thank you for your contributions. Picked and pushed! |
…o generators.
Rationale is that I was running fusesoc from a virtual environment on Windows, and needed
fusesoc
to callpython
to generate a core for me.Unfortunately, due to some wonderful design choices in Windows that I don't really understand, even with the
PATH
correctly set in the virtual environment,fusesoc
was invoking my systempython
, instead of the virtual environment one. This caused my generators using a new amaranth feature to fail because I don't have the corresponding commits on theamaranth
installed on my system (and checking out that version andpip install -e .
just papers over what I think is a path search issue).shutil
is also apparently the appropriate way to work around path issues like mine. See the warning in thePopen
constructor.