From cd36b0e62c002586cf6bcfc2d5f4dfaee1475048 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Thu, 11 Jul 2024 16:32:29 +0900 Subject: [PATCH] darwin workaround for python3 --- .github/workflows/ci.yml | 2 ++ python3/Makefile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ea210d..e61a843 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,6 +101,8 @@ jobs: CC: ${{ matrix.cc }} CXX: ${{ matrix.cxx }} RUMPRUN_TOOLCHAIN_TUPLE: ${{ matrix.rumprun_tuple }} + C_INCLUDE_PATH: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers + CPLUS_INCLUDE_PATH: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers defaults: run: diff --git a/python3/Makefile b/python3/Makefile index 581f7cb..3b8d7ab 100644 --- a/python3/Makefile +++ b/python3/Makefile @@ -59,7 +59,8 @@ dl/$(TARBALL): build/hostpython: | dl/$(TARBALL) mkdir -p build (cd build && tar -x --strip-components 1 -f ../dl/$(TARBALL)) - (cd build; CFLAGS=$(HOST_CFLAGS) ./configure --prefix=$(shell pwd)/build/hostdist; make python Parser/pgen && make install) + (cd build && sed "s/^MULTIARCH.*//" configure > /tmp/a; mv /tmp/a configure; chmod +x configure) + (cd build; CFLAGS=$(HOST_CFLAGS) ./configure --prefix=$(shell pwd)/build/hostdist; CFLAGS=-IInclude make python Parser/pgen && make install) mv build/python$(EXESUFFIX) build/hostpython build/Parser/hostpgen: build/hostpython