summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-06-09 03:36:08 +0200
committerGravatar Nikias Bassen2021-06-09 03:36:08 +0200
commitf64f30aa845ca94ab790da029a36cbdd585a1dd8 (patch)
tree999b73a4d7b3303fdd3efe88d5edb83166018f80
parentc06ae5601513a0c2a89fae80bd8a38faea12741b (diff)
downloadlibplist-f64f30aa845ca94ab790da029a36cbdd585a1dd8.tar.gz
libplist-f64f30aa845ca94ab790da029a36cbdd585a1dd8.tar.bz2
[github-actions] Use python3/cython3 for building python bindings
-rw-r--r--.github/workflows/build.yml26
1 files changed, 20 insertions, 6 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8cef57b..f8eaf88 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,10 +7,13 @@ jobs:
7 runs-on: ubuntu-latest 7 runs-on: ubuntu-latest
8 steps: 8 steps:
9 - name: install dependencies 9 - name: install dependencies
10 run: sudo apt-get install cython 10 run: |
11 sudo apt-get install cython3
11 - uses: actions/checkout@v2 12 - uses: actions/checkout@v2
12 - name: autogen 13 - name: autogen
13 run: ./autogen.sh 14 run: |
15 export PYTHON=python3
16 ./autogen.sh
14 - name: make 17 - name: make
15 run: make 18 run: make
16 - name: make check 19 - name: make check
@@ -25,7 +28,7 @@ jobs:
25 else 28 else
26 brew install libtool autoconf automake 29 brew install libtool autoconf automake
27 fi 30 fi
28 pip install cython 31 pip3 install cython
29 shell: bash 32 shell: bash
30 - uses: actions/checkout@v2 33 - uses: actions/checkout@v2
31 - name: autogen 34 - name: autogen
@@ -40,9 +43,20 @@ jobs:
40 done 43 done
41 export CFLAGS="$USEARCHS -isysroot $SDKDIR" 44 export CFLAGS="$USEARCHS -isysroot $SDKDIR"
42 echo "Using CFLAGS: $CFLAGS" 45 echo "Using CFLAGS: $CFLAGS"
43 export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/2.7/bin" 46 PYTHON3_BIN=`xcrun -f python3`
44 export LIBS="-L/Library/Frameworks/Python.framework/Versions/2.7/lib" 47 if test -x $PYTHON3_BIN; then
45 export PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error /System/Library/Frameworks/Python.framework/Versions/2.7/Python" 48 export PYTHON=$PYTHON3_BIN
49 PYTHON_VER=`$PYTHON3_BIN -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))"`
50 PYTHON_EXEC_PREFIX=`$PYTHON3_BIN -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('exec_prefix'))"`
51 PYTHON_LIBS_PATH=$PYTHON_EXEC_PREFIX/lib
52 PYTHON_FRAMEWORK_PATH=$PYTHON_EXEC_PREFIX/Python3
53 export PYTHON_LIBS="-L$PYTHON_LIBS_PATH -lpython$PYTHON_VER"
54 export PYTHON_EXTRA_LDFLAGS="-Wl,-stack_size,1000000 -framework CoreFoundation $PYTHON_FRAMEWORK_PATH"
55 else
56 export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/2.7/bin"
57 export LIBS="-L/Library/Frameworks/Python.framework/Versions/2.7/lib"
58 export PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error /System/Library/Frameworks/Python.framework/Versions/2.7/Python"
59 fi
46 ./autogen.sh 60 ./autogen.sh
47 - name: make 61 - name: make
48 run: make 62 run: make