Commit Graph

3 Commits

Author SHA1 Message Date
Mohamed Gaber 43128f6283
wheels: move from postreleases to minor versions, remove authors 2024-10-07 16:51:17 +03:00
Mohamed Gaber 0bb1f899e8
wheels: convert versions to match pypa spec, add uploading
* 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)
2024-10-07 16:39:54 +03:00
Mohamed Gaber 407343a7a1
Pyosys Wheels
* 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
2024-10-07 16:39:54 +03:00