Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .github/scripts/generate_tag.py

This file was deleted.

139 changes: 0 additions & 139 deletions .github/scripts/gh.py

This file was deleted.

69 changes: 49 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,30 @@ name: Build Wheels for PyPI

# Events that trigger workflow
on:
# Runs on all pushes to branches
push:
branches:
- "*"
- "main"
tags-ignore:
- "**"
# Runs on all PRs
pull_request:
# Manual Dispatch
workflow_dispatch:

concurrency:
# Behavior:
# - Group all pull requests: latest push cancels previous ones
# - Group all branches:
# - If main/version- branches: run serially
# - Else, latest push cancels previous ones
group: >
${{
(github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number)) ||
(github.event_name == 'push' && format('branch-{0}', github.ref_name)) ||
''
}}
cancel-in-progress: ${{ github.event_name == 'pull_request' || !(github.ref_name == 'main') }}

jobs:
build_wheels:
Expand All @@ -43,10 +63,16 @@ jobs:
archs: "aarch64",
},
{
name: "macOS 14",
name: "macOS 15",
family: "macos",
runner: "macos-15",
archs: "arm64",
},
{
name: "macOS 15",
family: "macos",
runner: "macos-14",
archs: "x86_64,arm64",
runner: "macos-15",
archs: "x86_64",
},
# {
# name: "Windows Server 2022",
Expand All @@ -57,33 +83,39 @@ jobs:
name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }}
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
submodules: true
persist-credentials: false
- run: |
perl -i -pe 'print "__attribute__((weak)) " if /LibertyParser::error/' yosys/passes/techmap/libparse.cc
- uses: actions/setup-python@v5
- if: ${{ matrix.os.family == 'macos' && matrix.os.archs == 'arm64' }}
name: "[macOS/arm64] Install Python 3.8 (see: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64)"
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build wheels
uses: pypa/cibuildwheel@v2.21.1
uses: pypa/cibuildwheel@v4.3.5
with:
output-dir: dist
env:
# * APIs not supported by PyPy
CIBW_SKIP: >
pp*
CIBW_ARCHS: ${{ matrix.os.archs }}
CIBW_BUILD_VERBOSITY: "1"
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
- uses: actions/upload-artifact@v4
# patchelf version installed by default creates a corrupt ELF binary
# sometimes
CIBW_REPAIR_WHEEL_COMMAND_LINUX: pip3 install --upgrade patchelf && auditwheel repair -w {dest_dir} {wheel}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/test
- name: Build sdist
if: ${{ matrix.os.family == 'linux' && matrix.os.archs == 'x86_64' }}
run: pipx run build --sdist . --outdir ./dist
- uses: actions/upload-artifact@v7
with:
name: python-wheels-${{ matrix.os.runner }}
path: ./wheelhouse/*.whl
name: python-wheels-${{ matrix.os.runner }}-${{ matrix.os.archs }}
path: ./dist/*
upload_wheels:
name: Upload Wheels
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand All @@ -95,14 +127,11 @@ jobs:
id-token: write
needs: build_wheels
steps:
- uses: actions/download-artifact@v4
- name: Download all wheel artifacts
uses: actions/download-artifact@v8
with:
path: "."
path: dist
pattern: python-wheels-*
merge-multiple: true
- run: |
ls
mkdir -p ./dist
mv *.whl ./dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include Readme.md
include libparse/stdio_filebuf.h
include yosys/kernel/*.h
include yosys/kernel/constids.inc
include include/*.h
include include/kernel/*.h
include yosys/passes/techmap/libparse.*
16 changes: 12 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# libparse-python

A SWIG-based Python wrapper around [Yosys](https://github.com/yosyshq/yosys)'s
A pybind11-based Python wrapper around [Yosys](https://github.com/yosyshq/yosys)'s
`libparse`, for all your dotlib file parsing needs.

# Requirements

## Running

* UNIX or UNIX-like operating system (Windows untested)
* Python 3.8+ (CPython or PyPy) with PIP
* Python 3.10+ (CPython or PyPy) with PIP
* C++20 compiler
* For binary wheels, any of:
* GNU/Linux with Glibc 2.27 or later
* Linux with musl libc 1.2 or later
* macOS 11 "Big Sur" or later

# Building

* binary wheel: `python3 -m pip wheel .`
* sdist: `python3 -m build --sdist .`

# License
Apache 2.0. Check 'License'.
Expand Down
46 changes: 0 additions & 46 deletions default.nix

This file was deleted.

Loading
Loading