Compare commits

5 changed files with 37 additions and 12 deletions

No files matched your search

+13 -3
View File
@@ -16,9 +16,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019, macos-12]
os: [ubuntu-22.04, windows-2019, macos-14]
steps:
- name: Install SWIG with Homebrew
if: matrix.os == 'macos-14' && matrix.enabled
run: brew install swig
- name: Checkout rz-bindgen
uses: actions/checkout@v4
@@ -30,7 +34,7 @@ jobs:
ref: ${{ inputs.rizin_ref }}
- name: Build rz-bindgen
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
- name: Upload sdist
uses: actions/upload-artifact@v4
@@ -62,7 +66,13 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get --assume-yes install cmake swig pkg-config clang libclang-dev llvm wget unzip python3-wheel python3-setuptools build-essential python3-pip && sudo pip3 install meson ninja
sudo apt-get --assume-yes install cmake swig pkg-config clang libclang-dev llvm wget unzip python3-wheel python3-setuptools build-essential python3-pip
pygt311=$(python3 -c 'import sys; print(0) if sys.version_info.minor > 11 else print(1)' 2>&1)
if [[ $pygt311 == '0' ]]; then
sudo pip3 --break-system-packages install meson ninja
else
sudo pip3 install meson ninja
fi
- name: Install rizin
run: |
+15 -7
View File
@@ -4,23 +4,30 @@
set -ex
# Install deps
pip3 install meson ninja meson-python build
pygt311=$(python3 -c 'import sys; print(0) if sys.version_info.minor > 11 else print(1)' 2>&1)
if [[ $pygt311 == '0' ]]; then
pip3 install --break-system-packages meson ninja meson-python build
else
pip3 install meson ninja meson-python build
fi
if command -v apt; then
if command -v brew; then
brew install --require-sha swig
elif command -v apt; then
set +e
grep VERSION_CODENAME=stretch /etc/os-release >/dev/null 2>/dev/null
if [[ $? == 0 ]] ; then
# Required because manylinux_2_24 uses Debian Stretch and the repos are not available anymore
# Required because manylinux_2_24 uses Debian Stretch and the repos are not available anymore
echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list
echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
echo "Acquire::Check-Valid-Until no;" > /etc/apt/apt.conf.d/99no-check-valid-until
fi
set -e
apt update && apt install --assume-yes libclang-7-dev clang-7 llvm-7
apt update && apt install --assume-yes libclang-7-dev clang-7 llvm-7 sudo
elif command -v apk; then
apk update && apk add clang-dev
apk update && apk add clang-dev sudo
elif command -v yum; then
yum -y install llvm-toolset-7.0 llvm-toolset-7.0-llvm-devel
yum -y install llvm-toolset-7.0 llvm-toolset-7.0-llvm-devel sudo
# (CentOS 7) Uncomment following lines to see required paths in build log:
# yum -y install centos-release-scl
# source scl_source enable llvm-toolset-7.0 || true
@@ -30,11 +37,12 @@ pushd rizin
if [[ "$OSTYPE" =~ msys* ]]; then
meson setup --buildtype=release --prefix='c:/rizin' --vsenv build
meson install -C build
else
meson setup --buildtype=release --libdir=lib build
sudo meson install -C build
fi
meson install -C build
popd
if command -v apt; then
+4 -1
View File
@@ -22,10 +22,13 @@ archs = ["x86_64"]
environment = { CMAKE_PREFIX_PATH="C:\\rizin" }
archs = ["AMD64"]
[tool.cibuildwheel.macos]
environment = { PATH="/opt/homebrew/bin:$PATH", MACOSX_DEPLOYMENT_TARGET="14.0" }
[project]
name = "rz-bindings"
dynamic = [
'version',
]
requires-python = ">=3.8"
requires-python = ">=3.9"
readme = "README.md"
-1
View File
@@ -258,7 +258,6 @@ def bind_cons(cons_h: Header) -> None:
typedef="RzCons",
ignore_fields={"term_raw", "term_buf"}, # struct termios
rename_fields={
"lastline": "_lastline",
"echo": "_echo",
"highlight": "_highlight",
"newline": "_newline",
+5
View File
@@ -265,6 +265,11 @@ def write_func(writer: Writer, func: Func, name: str, kind: FuncKind) -> None:
if arg_name == "self":
arg_name = "_self"
# if function arg is the same as the function name
# we rename the argument
if arg_name == name:
arg_name += "_arg"
arg_decl = stringify_decl(
arg_name,
arg.ctype,