Skip to content

Commit

Permalink
darwin workaround for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
thehajime committed Jul 11, 2024
1 parent d6a8a7e commit 2431350
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion python3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ 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)
ifeq ($(shell uname),Darwin)
(cd build && sed "s/^MULTIARCH=.*//" configure > /tmp/a; mv /tmp/a configure; chmod +x configure)
endif
(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
Expand Down

0 comments on commit 2431350

Please sign in to comment.