Allow Python to choose generator interpreter using shutil parameter t…#647
Allow Python to choose generator interpreter using shutil parameter t…#647olofk merged 1 commit intoolofk:mainfrom
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
fusesocto callpythonto generate a core for me.Unfortunately, due to some wonderful design choices in Windows that I don't really understand, even with the
PATHcorrectly set in the virtual environment,fusesocwas 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 theamaranthinstalled on my system (and checking out that version andpip install -e .just papers over what I think is a path search issue).shutilis also apparently the appropriate way to work around path issues like mine. See the warning in thePopenconstructor.