mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Enable travis for OS X as well
This commit is contained in:
parent
e46bc37412
commit
8b133bac43
16
.travis.yml
16
.travis.yml
@ -1,4 +1,3 @@
|
|||||||
sudo: false
|
|
||||||
language: node_js
|
language: node_js
|
||||||
nodejs:
|
nodejs:
|
||||||
- 6
|
- 6
|
||||||
@ -7,12 +6,21 @@ cache:
|
|||||||
- node_modules
|
- node_modules
|
||||||
- .build-cache
|
- .build-cache
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
sudo: false
|
||||||
env:
|
env:
|
||||||
- SW=$HOME/sw PATH=$SW/bin:$PATH CFLAGS=-I$SW/include LDFLAGS=-L$SW/lib LD_LIBRARY_PATH=$SW/qt/lib:$SW/lib PKG_CONFIG_PATH=$SW/lib/pkgconfig QMAKE=$SW/qt/bin/qmake QT_PLUGIN_PATH=$SW/qt/plugins
|
- SW=$HOME/sw PATH=$SW/bin:$PATH CFLAGS=-I$SW/include LDFLAGS=-L$SW/lib LD_LIBRARY_PATH=$SW/qt/lib:$SW/lib PKG_CONFIG_PATH=$SW/lib/pkgconfig QMAKE=$SW/qt/bin/qmake QT_PLUGIN_PATH=$SW/qt/plugins
|
||||||
|
- os: osx
|
||||||
|
env:
|
||||||
|
# On OS X the frameworks/dylibs contain hard coded paths, so we have to re-create the paths in the VM exactly
|
||||||
|
- SWBASE=/Users/kovid SW=$SWBASE/sw PATH=$SW/bin:$SW/qt/bin:$SW/python/Python.framework/Versions/2.7/bin:$PWD/node_modules/.bin:$PATH CFLAGS=-I$SW/include LDFLAGS=-L$SW/lib QMAKE=$SW/qt/bin/qmake QT_PLUGIN_PATH=$SW/qt/plugins MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- curl https://download.calibre-ebook.com/travis/sw-linux.tar.xz | tar xJ -C $HOME
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl https://download.calibre-ebook.com/travis/sw-linux.tar.xz | tar xJ -C $HOME; fi
|
||||||
- npm install rapydscript-ng && ln -s `pwd`/rapydscript-ng/bin/rapydscript $SW/bin/rapydscript
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo mkdir -p $SWBASE && sudo chown $USER $SWBASE; fi
|
||||||
- rapydscript --version
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl https://download.calibre-ebook.com/travis/sw-osx.tar.bz2 | tar xj -C $SWBASE; fi
|
||||||
|
- npm install --no-optional rapydscript-ng && echo $PATH && which rapydscript && rapydscript --version
|
||||||
- python setup.py bootstrap --ephemeral
|
- python setup.py bootstrap --ephemeral
|
||||||
script: python setup.py test
|
script: python setup.py test
|
||||||
|
2
setup.py
2
setup.py
@ -12,7 +12,7 @@ def check_version_info():
|
|||||||
vi = sys.version_info
|
vi = sys.version_info
|
||||||
if vi[0] == 2 and vi[1:3] >= (7, 9):
|
if vi[0] == 2 and vi[1:3] >= (7, 9):
|
||||||
return None
|
return None
|
||||||
raise SystemExit('calibre requires python >= 2.7.9 and < 3')
|
raise SystemExit('calibre requires python >= 2.7.9 and < 3. Current python version: %s' % vi)
|
||||||
check_version_info()
|
check_version_info()
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
||||||
|
7
setup/installer/osx/build-scripts/export-sw
Executable file
7
setup/installer/osx/build-scripts/export-sw
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd $HOME
|
||||||
|
rm sw-osx*;
|
||||||
|
echo "[Paths]\nPrefix = .." > ~/sw/qt/bin/qt.conf && cat ~/sw/qt/bin/qt.conf
|
||||||
|
echo "[Paths]\nPrefix = ../qt" > ~/sw/bin/qt.conf && cat ~/sw/bin/qt.conf
|
||||||
|
tar cf sw-osx.tar --exclude sw/build --exclude sw/sources --exclude sw/man --exclude '*.pyc' --exclude '*.pyo' --exclude 'sw/share/doc' --exclude sw/share/gtk-doc --exclude sw/share/man --exclude sw/share/info sw && bzip2 --best sw-osx.tar
|
||||||
|
rm ~/sw/qt/bin/qt.conf ~/sw/bin/qt.conf
|
Loading…
x
Reference in New Issue
Block a user