Skip to content

Commit

Permalink
Test pyinstaller as build system
Browse files Browse the repository at this point in the history
  • Loading branch information
Insoleet committed Jan 15, 2016
1 parent 964d5cd commit e215db5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ build_script:
- echo %errorlevel%

artifacts:
- path: build
- path: dist
name: sakia-win$(PYTHON_ARCH)
# upload to releases
deploy:
Expand Down
5 changes: 3 additions & 2 deletions ci/appveyor/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ pyrcc5 -version
lrelease -version

pip install -r requirements.txt
pip install pyinstaller

python gen_resources.py
if %errorlevel% neq 0 exit /b 1s

python gen_translations.py
if %errorlevel% neq 0 exit /b 1

@REM python setup.py build
@REM if %errorlevel% neq 0 exit /b 1
pyinstaller src/sakia/main.py --additional-hooks-dir hooks
if %errorlevel% neq 0 exit /b 1
4 changes: 2 additions & 2 deletions ci/travis/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

if [ $TRAVIS_OS_NAME == "osx" ]
then
zip -r sakia-${TRAVIS_OS_NAME}.zip build/*.dmg
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/*
elif [ $TRAVIS_OS_NAME == "linux" ]
then
zip -r sakia-${TRAVIS_OS_NAME}.zip build/exe*
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/
fi
6 changes: 3 additions & 3 deletions ci/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ eval "$(pyenv virtualenv-init -)"
cd $HOME/build/ucoin-io/sakia
pyenv activate sakia-env
pip install coveralls
pip install cx_Freeze
pip install pyinstaller
pip install -r requirements.txt
if [ $TRAVIS_OS_NAME == "linux" ]
then
Expand All @@ -19,9 +19,9 @@ python gen_translations.py

if [ $TRAVIS_OS_NAME == "osx" ]
then
python setup.py bdist_dmg
pyinstaller src/sakia/main.py --additional-hooks-dir hooks
elif [ $TRAVIS_OS_NAME == "linux" ]
then
python setup.py build
pyinstaller src/sakia/main.py --additional-hooks-dir hooks
fi

15 changes: 15 additions & 0 deletions hooks/hook-lib2to3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2016, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------

# This is needed to bundle draft3.json and draft4.json files that come
# with jsonschema module

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files('lib2to3')

0 comments on commit e215db5

Please sign in to comment.