-
Notifications
You must be signed in to change notification settings - Fork 891
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
Pyosys Wheels #4534
Merged
Merged
Pyosys Wheels #4534
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
donn
force-pushed
the
test_wheels
branch
15 times, most recently
from
September 29, 2024 13:26
f15c785
to
be85b3c
Compare
donn
force-pushed
the
test_wheels
branch
5 times, most recently
from
October 4, 2024 19:37
2148ccd
to
aec42ca
Compare
* Created `setup.py`: Python package manifest to build `pyosys` wheels with a custom extension to build and include `libyosys.so` using Make * `.gitignore`: Added byproducts of the Python wheel build process * `Makefile`: Added `-undefined dynamic_lookup` to `libyosys.so` so missing symbols can be resolved by importing into a Python interpreter * `kernel/yosys.cc`: Gated `PyImport_AppendInittab` with `!Py_IsInitialized`; as of Python 3.12, the interpreter is already initialized and `PyImport_AppendInittab` would cause an exception to be raised * Created `wheels.yml`: CI workflow for building wheels for CPython on: * Linux (glibc, musl) and Darwin * x86-64 and arm64
* Update manylinux images * FFI now built as a per-platform static library * Explicitly set minimum macOS deployment target, use clang on macOS * Try enabling Windows (as an experiment) * Disable aarch64-linux, aarch64-windows
* wheel versions now replace `+` with `.post` to match spec at https://packaging.python.org/en/latest/specifications/version-specifiers/ * CI updates: * Bump action versions * Disabled Windows for now and documented why * Added a new job to upload all wheels * Added new variable, `PYPI_INDEX`: fallback 'https://pypi.org/' if unset * Added new secret, `PYPI_TOKEN` * .editorconfig now uses 2 spaces for YML (it kept setting mine to tabs and GitHub Actions doesn't like that)
mmicko
approved these changes
Oct 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates for 2024-10-04 and 2024-10-07:
After many discussions, we've arrived at the following:
+
replaced with.
to comply with the pypa version spec (and allow for patch versions)The initial set of wheels are up on the Test PyPI here https://test.pypi.org/project/pyosys/ and can be installed as follows:
pip install -i https://test.pypi.org/simple/ pyosys
What are the reasons/motivation for this change?
We'd like to replace our aging Tcl-based synthesis scripts with fresh new ones written for Pyosys.
Unfortunately, the only way to get Pyosys right now that I'm aware of is to compile it from source. This would take too much time in say, a Google Colaboratory.
Along with
yowasp-yosys
, this gives users two options to use Yosys via PIP: either natively via the Python API, or the full app using WebAssembly.Explain how this is achieved.
setup.py
: Python package manifest to buildpyosys
wheels with a custom extension to build and includelibyosys.so
using Make.gitignore
: Added byproducts of the Python wheel build processMakefile
: Added-undefined dynamic_lookup
tolibyosys.so
so missing symbols can be resolved by importing into a Python interpreterkernel/yosys.cc
: GatedPyImport_AppendInittab
with!Py_IsInitialized
; as of Python 3.12, the interpreter is already initialized andPyImport_AppendInittab
would cause an exception to be raisedwheels.yml
: CI workflow for building wheels for CPython on GNU/Linux, Musl/Linux and Darwin.libboost_{python3,system,filesystem}
are built per-Python version and statically linked into thelibyosys.so
binary.If applicable, please suggest to reviewers how they can test the change.
You can build and test a wheel locally for your setup as follows: (You will still need all of Yosys' dependencies)
I'm primarily inviting comment at this point, I would like to know the maintainers' thoughts on:
CIBW_BEFORE_BUILD
script will work on Windows at allpython3-config
which pypy does not have