-
Notifications
You must be signed in to change notification settings - Fork 996
pyosys: uv for non-wheel builds, update instructions #5434
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
tox for non-wheels builds, update instructionsThere 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.
$ git reset --hard
HEAD is now at 7193598fb pyosys: `tox` for non-wheels builds, update instructions
$ make clean
[...]
$ git diff --stat
kernel/binding.h | 60 -----
kernel/celltypes.h | 556 --------------------------------------------
kernel/consteval.h | 426 ----------------------------------
kernel/cost.h | 99 --------
kernel/log.h | 528 ------------------------------------------
kernel/register.h | 179 ---------------
kernel/rtlil.h | 2447 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
kernel/yosys.h | 103 ---------
libs/sha1/sha1.h | 57 -----
9 files changed, 4455 deletions(-)
(we're discussing this privately, but I want to clarify I don't think this is presently ready to merge)
|
Rebased on |
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.
It builds now; might wait for a JF to get more eyes on this though.
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.
in the JF it was decided that we'd prefer uv over tox for this process.
- add `uv` to dependencies: saves builder(s) from manually having to manage a venv for python build dependencies - when building wheels, pip automatically creates the environment with those dependencies, so no need for uv - when running simply `make ENABLE_PYOSYS=1`, this is not the case. people attempting to `pip3 install --upgrade pybind11 cxxheaderparser` to add it to their system packages will be met with a scare message about "breaking system packages" - update installation instructions to drop boost and add uv instead - update ci scripts to use `macos-15[-intel]` (`macos-13` sunset in early december)
What are the reasons/motivation for this change?
@Ravenslofty noted that unlike the previous setup, users may have to manually manage a virtual environment to get the new Python build dependencies (pybind11 and cxxheaderparser,) and that is cumbersome.
While pybind11 can in fact be installed via package managers, it tends to be out of date more often than not. cxxheaderparser is not in any package manager that isn't Nix.
I considered just handling the ImportError to instruct the user on creating a venv but that's also just kind of cumbersome.
Explain how this is achieved.
uvto list of dependencies: saves builders from manually having to manage a venv for python build dependenciesmake ENABLE_PYOSYS=1, this is not the case. people attempting topip3 install --upgrade pybind11 cxxheaderparserto add it to their system packages will be met with a scare message about "breaking system packages"PYOSYS_USE_UV=0suppresses this behaviorNaturally, uv is not required if you're not building Yosys with Python support.
Make sure your change comes with tests. If not possible, share how a reviewer might evaluate it.
On an Ubuntu 22.04 installation (Ubuntu 20.04 also in theory but the Bison on there is out of date so you have to build that on your own), running the instructions in Readme.md should be enough to allow
make ENABLE_PYOSYS=1to build successfully without further intervention.I validated that statement as follows:
macos-13is being sunset by EOY, I updated the wheels CI script to usemacos-15andmacos-15-intelbefore I forget about them, and for consistency updated the other CI scripts as well. https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/