mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Enable Python for MacOS travis-ci builds
Using the Python version installed by Hombrew, currently 3.7.5
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -ev
|
||||
|
||||
# D2XX
|
||||
mkdir D2XX
|
||||
cp /Volumes/release/D2XX/Object/10.5-10.7/x86_64/libftd2xx.1.2.2.dylib D2XX
|
||||
sudo cp /Volumes/release/D2XX/Object/10.5-10.7/x86_64/libftd2xx.1.2.2.dylib /usr/local/lib
|
||||
cp /Volumes/release/D2XX/bin/*.h D2XX
|
||||
sed -i "" "s|libftd2xx.dylib|@executable_path/../Frameworks/libftd2xx.1.2.2.dylib|" src/FileIO/D2XX.cpp
|
||||
|
||||
# Python SIP
|
||||
python3 --version
|
||||
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz
|
||||
tar xf sip-4.19.8.tar.gz
|
||||
cd sip-4.19.8
|
||||
python3 configure.py
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
|
||||
cp src/gcconfig.pri.in src/gcconfig.pri
|
||||
/usr/local/opt/qt5/bin/lupdate src/src.pro
|
||||
@@ -36,6 +49,12 @@ sed -i "" "s|#\(DEFINES += GC_WANT_ROBOT.*\)|\1 |" src/gcconfig.pri
|
||||
##Issues with c++11 and stdlib on travis and dependencies
|
||||
sed -i "" "s|#\(DEFINES += GC_WANT_R.*\)|\1 |" src/gcconfig.pri
|
||||
echo "QMAKE_CFLAGS_RELEASE += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
# Python (avoid colision between GC Context.h and Python context.h)
|
||||
echo DEFINES += GC_WANT_PYTHON >> src/gcconfig.pri
|
||||
echo PYTHONINCLUDES = -I$TRAVIS_BUILD_DIR/src/Core `python3-config --includes` >> src/gcconfig.pri
|
||||
echo PYTHONLIBS = `python3-config --ldflags` >> src/gcconfig.pri
|
||||
|
||||
# Patch Secrets.h
|
||||
sed -i "" "s/__GC_GOOGLE_CALENDAR_CLIENT_SECRET__/"$GC_GOOGLE_CALENDAR_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_STRAVA_CLIENT_SECRET__/"$GC_STRAVA_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_DROPBOX_CLIENT_SECRET__/"$GC_DROPBOX_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
|
||||
Reference in New Issue
Block a user