-
Notifications
You must be signed in to change notification settings - Fork 1k
Copy abc stuff for pyosys to enable use of the abc pass
#4901
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
Conversation
|
Has this broken since #4643? Or is that specific to building wheels, and if so does this break that? |
|
That is specific to building wheels. This fixes the same issue for |
|
Okay, seems fine to me then. @mmicko are you familiar with how the wheels are built? Does this seem likely to break anything there or is it good to merge? |
|
@donn could you please check if this is affecting wheels build ? |
|
@mmicko I'll test, but… @akashlevy The wheels should already include both yosys-abc and share. How are you building them? Line 76 in 38f8583
|
|
I'm building with |
|
|
|
Yes, I guess the real issue is that the search path does not get configured correctly in the general case (which was what #4643 was attempting to fix I guess?) For example, the workflow I use (which is pretty standard for Python development AFAIK) is to have a Python virtual environment called The best solution I could see is to just copy these resources right into the |
|
If we think it makes most sense to use the wheel, then perhaps we should use a wheel-style installation for |
|
Even if you installed it into a venv, as long as you set Line 934 in 38f8583
The fact that's not working suggests a deeper issue. Would you kindly share what installation commands you're running exactly? Just (Also, the conventional way to install something into a At any rate, the wheels still work great with this PR. |
|
Here's what I have been using: Honestly, now that I look at this again, it does feel quite roundabout. I think it makes way more sense to just do I propose we remove the legacy |
That seems like the better approach here. |
|
@donn @mmicko @KrystalDelusion see now for approach using wheel |
KrystalDelusion
left a comment
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.
Since the wheel/install-wheel targets are always available, it might be nice to automatically set ENABLE_PYOSYS if the user has explicitly called make install-wheel? That or put those two targets inside a ifeq ($(ENABLE_PYOSYS),1) block.
|
I don't know how to set a variable from within a target (is that even possible?) Instead, I used the I also added a few more things to |
I don't think you can set it within a target, and even if you did it would be too late to actually do what it needs to. I think it is possible to check the target, but yeah the other way is much easier, and nice that you put the error on it too :) |
|
Thanks :) |
Partially reverts commit 9c5bffc. The reasoning behind this is that setup.py is intended to strictly consume the Makefile and not be consumed by it. The attempt at using them recursively has caused a number of issues and has rendered Pyosys unusable to some users: See YosysHQ#5012 Additionally, unlike the previous pyosys installation target, the wheel installation does not respect PREFIX=, only venvs. For installation inside a venv, the intended method should remain a user manually executing `pip3 install .` instead of relying on the Makefile.
What are the reasons/motivation for this change?
Pyosys is incapable of using the
abcpass without this change when usingmake install ENABLE_PYOSYS=1, as the binary is missing.Explain how this is achieved.
Copy over
yosys-abcbinary andsharedirectory to Pyosys install directory.If applicable, please suggest to reviewers how they can test the change.
Try calling the
abcpass inpyosysbefore and after the change when usingmake install ENABLE_PYOSYS=1with a virtual environment