Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • cebash/sakia
  • santiago/sakia
  • jonas/sakia
3 results
Select Git revision
Show changes
Commits on Source (834)
Showing with 521 additions and 81 deletions
...@@ -41,8 +41,17 @@ nosetests.xml ...@@ -41,8 +41,17 @@ nosetests.xml
src/sakia/gen_resources/* src/sakia/gen_resources/*
src/icons_rc.py src/icons_rc.py
src/i18n_rc.py src/i18n_rc.py
src/sakia/icons_rc.py
src/sakia/i18n_rc.py
res/i18n/qm res/i18n/qm
res/i18n/lang-* res/i18n/lang-*
out out
.directory .directory
temp temp
*_uic.py
# mypy
.mypy_cache
# pyenv
/.python-version
stages:
- format
- tests
- build
- release
image: registry.duniter.org/docker/python3/sakia-builder:1.2.0
# SUB-TASKS
.push_to_github:
tags:
- github
after_script:
# remove all files in current repo
- rm -rf ./*
- rm -rf .git*
# do a mirror clone in current repo
- git clone --mirror $CI_REPOSITORY_URL .
# do config for github push
- git remote add github $GITHUB_URL_AND_KEY
- git config --global user.email "contact@duniter.org"
- git config --global user.name "Duniter"
# remove refs about merge requests
- bash -c "cat packed-refs | grep -v 'refs/merge-requests' > packed-refs-new; echo 'Removed merge-requests refs.'"
- mv packed-refs-new packed-refs
# github push
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.changes:
only:
changes:
- src/sakia/*
- .gitlab-ci.yml
- Makefile
- requirements_dev.txt
- requirements_deploy.txt
- requirements.txt
- setup.py
- tests/**/*.py
# TASKS
format:
extends:
- .changes
stage: format
script:
- pip install -r requirements_dev.txt
- make check-format
tests:
extends:
- .changes
stage: tests
script:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- /start.sh # start xvfb
- make tests
build:
extends:
- .changes
stage: build
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
release_appimage:
extends:
- .changes
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make appimage
artifacts:
paths:
- ci/appimage/Sakia_x86_64.AppImage
# only:
# - master
release_pypi:
extends:
- .push_to_github
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy PYPI_LOGIN=${PYPI_LOGIN} PYPI_PASSWORD=${PYPI_PASSWORD}
only:
- master
release_pypi_test:
stage: release
when: manual
only: [tags, dev]
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy_test PYPI_TEST_LOGIN=${PYPI_TEST_LOGIN} PYPI_TEST_PASSWORD=${PYPI_TEST_PASSWORD}
...@@ -6,9 +6,11 @@ matrix: ...@@ -6,9 +6,11 @@ matrix:
sudo: required sudo: required
exclude: exclude:
- os: linux - os: linux
allow_failures:
- os: osx
env: env:
- PYENV_PYTHON_VERSION=3.5.2 - PYENV_PYTHON_VERSION=3.5.4
before_install: before_install:
- ci/travis/before_install.sh - ci/travis/before_install.sh
...@@ -18,7 +20,6 @@ script: ...@@ -18,7 +20,6 @@ script:
- ci/travis/test.sh - ci/travis/test.sh
after_success: after_success:
- ci/travis/after_success.sh - ci/travis/after_success.sh
before_deploy:
- ci/travis/before_deploy.sh - ci/travis/before_deploy.sh
deploy: deploy:
...@@ -37,6 +38,7 @@ deploy: ...@@ -37,6 +38,7 @@ deploy:
file: file:
- sakia-${TRAVIS_OS_NAME}.deb - sakia-${TRAVIS_OS_NAME}.deb
- sakia-${TRAVIS_OS_NAME}.zip - sakia-${TRAVIS_OS_NAME}.zip
- sakia-${TRAVIS_TAG}-py3-none-any.whl
skip_cleanup: true skip_cleanup: true
on: on:
tags: true tags: true
......
## v0.53.2 (18/01/2021)
This is the last version released by Vit.
No more new version or maintenance will be done.
Thanks to Inso for this wonderful project, and to every enthusiast users.
### Bugs
* #809 fix About Sakia available release search code and obsolete link to Github in exception
* #813 remove obsolete github references in README.md
* #815 remove unused dependency asynctest from requirements.txt
* fix "make tests" command running test scripts from AppDir in ci/appimage
## v0.53.1 (1/11/2020)
### Bugs
* #811 Fix WoT window is blank when clicking Explore until the menu "Show in WoT" is used.
Button is removed.
* #793 Fix crash `RuntimeError: no running event loop` when running on Python 3.8
### CI/CD
* #817 Add AppImage to release with automatic compilation in CD
## v0.53.0 (25/09/2020)
### Features
* #816 Add root_servers.yml in $HOME/.config/sakia folder to configure your own root servers
## v0.52.0 (23/04/2020)
### Features
* #807 Add new "Percentage of Average" referential
* Transfer window now use current referential instead of only relative by UD
* Add current referential units on the balance display
### Bugs
* Fix referentials french translation
* Fix network "Open in browser" menu
## v0.51.1 (05/04/2020)
### Bugs
* #802 Fix "Send as source" context menu not appear in Expert Mode on normal received transactions
* Update incomplete french translation
## v0.51.0 (03/04/2020)
### Features
* #798 - Complete workflow to send transaction that we can get back after one week:
* A selector allow to choose the lock condition of the output transaction
* Then, the transaction with special lock condition appears with an underline in the transaction history
* If you are the receiver, you can use the context menu action "Send as source" to send it to yourself
before the issuer get it back
* If you are the issuer, use the context menu action "Send as source" to send it to yourself after the delay
* Before the delay, you can check the lock condition in the transfer window to see the date when the transaction will be unlocked
* In Expert Mode (see Preferences), you can use any incoming transaction or dividend as source for your transfer
### Enhancement
* Add a legend for colors, italic and underlined display of transactions under transaction history
* Upgrade dependencies to duniterpy 0.57.0
### Bugs
* Fix gen_translations.py running Qt4 lrelease in Makefile
* Fix error parsing some WSP2 Head message because software version had a prefix (duniterpy fix)
### CI/CD
* Remove obsolete runner tag
* Release job only on `master`, release_test job only on `dev` or `tags`
## v0.50.5 (21/03/2020)
### Bugs
* Fix send money to pubkey with search user selected
### Tests
* Update and fix pytest suite
* Update duniter-mirage dependency version
### Enhancements
* Tx history update button set to disable until update is done
* Increase delay between network crawlings to 1 mn
### CI/CD
* Add format and tests stage in .gitlab-ci.yml
## v0.50.4 (18/03/2020)
### Code
* Fix session closed error (regression in v0.50.3)
## v0.50.3 (16/03/2020)
### Code
* Fix exception when refresh tx history
* Fix Unclosed client session error (at last !)
### CI/CD
* Fix bug with setuptools 28.8.x version in gitlab CI/CD image
## v0.50.2 (10/03/2020)
### Code
* Add system libs requirement and command line options in README.md
* Fix bad label "ok" on startup message box and enhance it
* Propose new sakia account menu at first start instead of create a new member account on the network
* Only display licence step when registering a new member account on the network
* Update french translation
### Project
* Fix release.sh using simple quote on sakia.__init__ version
* Add this changelog
## v0.50.1 (08/03/2020)
### Code
* Use asyncio.ensure_future() instead of async() which disappear from Py 3.7
* Include the license file into the wheel distributed, the license changed name
### CI/CD
* Fix sources path and allow all file extensions to trigger the CI
### Build
* Add dist check after build in Makefile
### Project
* Fix release.sh broken by black format
## [v0.50.0](https://git.duniter.org/clients/python/sakia/-/milestones/15) (07/03/2020)
### Code
* Update DuniterPy dependency to 0.56.0
* Fix all detected bugs
* Add the Sakia icon in toolbar
* Remove search direct connections
* Add update button in tx history
* Fix translation system
* Update french translation
.PHONY: docs tests check check-format mypy pylint format build deploy deploy_test
.SILENT: deploy deploy_test # do not echo commands with password
# bash required to use source command
SHELL := /bin/bash
# run tests
tests:
python3 gen_resources.py
python3 gen_translations.py
pytest -q -s --disable-warnings tests ${TESTS_FILTER}
# check
check: mypy pylint check-format
# check static typing
mypy:
python3 -m mypy src --ignore-missing-imports
python3 -m mypy tests --ignore-missing-imports
# check code errors
pylint:
pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 src/sakia/
pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 tests/
# check format
check-format:
black --check src
black --check tests
# format code
format:
black src
black tests
# build a wheel package in build folder and put it in dist folder
build:
if [ -d "./build" ]; then rm -r build/*; fi
if [ -d "./dist" ]; then rm -r dist/*; fi
python3 gen_resources.py
python3 gen_translations.py
python3 setup.py sdist bdist_wheel
twine check dist/*
appimage:
cd ci/appimage && wget -qc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
cd ci/appimage && wget -qc https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/linuxdeploy-plugin-python-x86_64.AppImage && chmod u+x linuxdeploy-plugin-python-x86_64.AppImage
cd ci/appimage && source config.env && ./build.sh
# upload on PyPi repository
deploy:
twine upload dist/* --username ${PYPI_LOGIN} --password ${PYPI_PASSWORD}
# upload on PyPi test repository
deploy_test:
twine upload dist/* --username ${PYPI_TEST_LOGIN} --password ${PYPI_TEST_PASSWORD} --repository-url https://test.pypi.org/legacy/
<!-- Landscape | [![Code Health](https://landscape.io/github/duniter/sakia/dev/landscape.svg?style=flat)](https://landscape.io/github/duniter/sakia/dev) --> ![sakia logo](https://git.duniter.org/clients/python/sakia/-/raw/master/sakia.png)
![sakia logo](https://raw.github.com/duniter/sakia/master/sakia.png) This project is not maintained anymore since 18/01/2021.
No more new version or maintenance will be done.
Vit thanks Inso for this wonderful project, and every enthusiast users.
# Sakia # Sakia
[![Coverage Status](https://coveralls.io/repos/duniter/sakia/badge.svg?branch=dev)](https://coveralls.io/r/duniter/sakia) [![coverage report](https://git.duniter.org/clients/python/sakia/badges/gitlab/coverage.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
[![pipeline status](https://git.duniter.org/clients/python/sakia/badges/gitlab/pipeline.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
[![Build Status](https://travis-ci.org/duniter/sakia.svg?branch=travis)](https://travis-ci.org/duniter/sakia) [![Build Status](https://travis-ci.org/duniter/sakia.svg?branch=travis)](https://travis-ci.org/duniter/sakia)
[![Build status](https://ci.appveyor.com/api/projects/status/pvl18xon8pvu2c8w/branch/dev?svg=true)](https://ci.appveyor.com/project/Insoleet/sakia-bee4m/branch/dev) [![Build status](https://ci.appveyor.com/api/projects/status/pvl18xon8pvu2c8w/branch/dev?svg=true)](https://ci.appveyor.com/project/Insoleet/sakia-bee4m/branch/dev)
[![Translation status](http://weblate.duniter.org/widgets/sakia/-/svg-badge.svg)](http://weblate.duniter.org/engage/sakia/?utm_source=widget)
[![Code Issues](https://www.quantifiedcode.com/api/v1/project/3fff212226eb4027a586bc32e32d909b/badge.svg)](https://www.quantifiedcode.com/app/project/3fff212226eb4027a586bc32e32d909b)
========
Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project. Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project.
### Features
## Goal features
* duniter account management via wallets and communities
* Multi-currency
* Multi-community
* Multi-wallets
* Contacts management
* User-friendly money transfer
* Community membership management
## Current state
### Done (master branch)
* Accounts management * Accounts management
* Communities viewing * Communities viewing
* Money Transfer * Money Transfer
* cx_freeze deployment
* Wallets management * Wallets management
* Contacts management * Contacts management
* Joining a community, publishing keys * Joining a community, publishing keys
...@@ -36,26 +24,128 @@ Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project. ...@@ -36,26 +24,128 @@ Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project.
### Dependencies ### Dependencies
* Dependencies : * Dependencies :
* [python3](https://www.python.org/downloads/) * Qt5
* [cx_freeze for python 3](http://cx-freeze.sourceforge.net/) * [python 3.6+](https://www.python.org/downloads/)
* [pyqt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5)
* [libsodium](http://doc.libsodium.org/installation/README.html) * [libsodium](http://doc.libsodium.org/installation/README.html)
* Python libraries dependencies :
* __duniterpy__
* General tips : use pyenv to build sakia, as described in the [wiki](https://github.com/duniter/sakia/wiki/Cutecoin-install-for-developpers) General tips : use [pyenv](https://github.com/pyenv/pyenv) to build sakia, as described in the [documentation](https://git.duniter.org/clients/python/sakia/-/blob/master/doc/install_for_developers.md)
Building Python with pyenv requires libraries of `openssl` and `sqlite3`. On Ubuntu, install it using the following commands :
### Build scripts apt-get update
* Run __python3 gen_resources.py__ in sakia folder apt-get install libssl-dev
* Run __python3 gen_translations.py__ in sakia folder apt-get install libsqlite3-dev
* Run __python3 setup.py build__ in sakia folder
* The executable is generated in "build" folder, named "sakia"
### Install with pip
* Run `pip install sakia`
* start "sakia" :)
### Download latest release ### Download latest release
* Go to [current release](https://github.com/duniter/sakia/releases) * Go to [current release](https://git.duniter.org/clients/python/sakia/-/releases)
* Download corresponding package to your operating system * Download AppImage for linux x86_64. Run it !
* Unzip and start "sakia" :) * Join our developer community by contacting us on [duniter forum](http://forum.duniter.org/)
* Join our beta community by contacting us on [duniter forum](http://forum.duniter.org/)
## Command line options
`-d` to display log to debug
`--currency g1-test` to connect to the g1-test currency network.
## Development
* When writing docstrings, use the reStructuredText format recommended by [PEP 0287](https://www.python.org/dev/peps/pep-0287/#docstring-significant-features)
* Use make commands to check the code and the format it correct.
The development tools require Python 3.6.x or higher.
* Install a supported Python version with [pyenv](https://github.com/pyenv/pyenv)
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
* Create a virtualenv in the project folder:
python -m venv .venv
* Install dependencies
pip install -r requirements.txt
* Run Sakia from the source code
PYTHONPATH="`pwd`/src/." python src/sakia/main.py
* Before submiting a merge requests, please check the static typing and tests.
* Install dev dependencies
pip install -r requirements_dev.txt
* Check static typing with [mypy](http://mypy-lang.org/)
make check
* Run all unit tests (pytest module) with:
make tests
> **Warning:** *do not run tests with sakia installed in your dev environment, because pytest will use the installed Sakia.*
* Run only some unit tests by passing a special ENV variable:
make tests TESTS_FILTER=tests/functional/test_transfer_dialog.py::test_transfer
## Packaging and deploy
### PyPi
In the development pyenv environment, install the tools to build and deploy
pip install --upgrade -r requirements_deploy.txt
Change and commit and tag the new version number (semantic version number)
./release.sh 0.x.y
Build the PyPi package in the `dist` folder
make build
Deploy the package to PyPi test repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
[SPACE]make deploy_test PYPI_TEST_LOGIN=xxxx PYPI_TEST_PASSWORD=xxxx
Install the package from PyPi test repository
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple/ sakia
Deploy the package on the PyPi repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
[SPACE]make deploy PYPI_LOGIN=xxxx PYPI_PASSWORD=xxxx
### Wheel Build scripts
make build
Or manually:
* Install __wheel__ with `pip install wheel`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the wheel : Run `python3 setup.py bdist_wheel` in sakia folder
### AppImage
make appimage
The make command will do a wheel build, then create the AppImage file `ci/appimage/Sakia_x86_64.AppImage`
### Pyinstaller Build scripts (not maintained)
* Install __pyinstaller__ with `pip install pyinstaller`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the binaries : Run `pyinstall sakia.spec`
## License ## License
This software is distributed under [GNU GPLv3](https://raw.github.com/duniter/sakia/dev/LICENSE). This software is distributed under [GNU GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).
...@@ -11,7 +11,7 @@ environment: ...@@ -11,7 +11,7 @@ environment:
PYTHON_ARCH: "64" PYTHON_ARCH: "64"
CONDA_PY: "35" CONDA_PY: "35"
CONDA_NPY: "18" CONDA_NPY: "18"
QTDIR: "C:\\Qt\\5.7\\msvc2015_64" QTDIR: "C:\\Qt\\5.9\\msvc2015_64"
platform: x64 platform: x64
- PYTHON: "C:\\Python35_32" - PYTHON: "C:\\Python35_32"
...@@ -19,7 +19,7 @@ environment: ...@@ -19,7 +19,7 @@ environment:
PYTHON_ARCH: "32" PYTHON_ARCH: "32"
CONDA_PY: "35" CONDA_PY: "35"
CONDA_NPY: "18" CONDA_NPY: "18"
QTDIR: "C:\\Qt\\5.7\\msvc2015" QTDIR: "C:\\Qt\\5.9\\msvc2015"
platform: x86 platform: x86
install: install:
...@@ -29,18 +29,13 @@ install: ...@@ -29,18 +29,13 @@ install:
#- dir /b /s /ad c:\Qt\5.6 #- dir /b /s /ad c:\Qt\5.6
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Add qt to path #- "SET QT_PLUGIN_PATH=%QTDIR%\\plugins"
- "SET PATH=%QTDIR%\\bin;%QTDIR%\\lib;%PATH%"
- "SET QT_PLUGIN_PATH=%QTDIR%\\plugins"
- echo %PATH% - echo %PATH%
#- choco install -y vcredist2015 #- choco install -y vcredist2015
- "%CMD_IN_ENV% conda config --set always_yes yes --set changeps1 no" - "%CMD_IN_ENV% conda config --set always_yes yes --set changeps1 no"
- "%CMD_IN_ENV% conda config --add channels inso/channel/sakia" - "%CMD_IN_ENV% conda config --add channels inso/channel/sakia"
- "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% libsodium=1.0.3 setuptools=19.2" - "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% libsodium=1.0.3 setuptools=19.2"
cache:
- C:\Qt\5.6\5.6
build_script: build_script:
- ".\\ci\\appveyor\\build.cmd" - ".\\ci\\appveyor\\build.cmd"
...@@ -73,4 +68,3 @@ deploy: ...@@ -73,4 +68,3 @@ deploy:
prerelease: true prerelease: true
on: on:
appveyor_repo_tag: true appveyor_repo_tag: true
#!/bin/bash
#./linuxdeploy-x86_64.AppImage --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
# workaround to run inside a docker container
./linuxdeploy-x86_64.AppImage --appimage-extract
mv squashfs-root linuxdeploy-x86_64.AppDir
./linuxdeploy-x86_64.AppDir/AppRun --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
version=0.53.2
# linuxdeploy python plugin
export PYTHON_SOURCE=https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
export PIP_REQUIREMENTS=$(pwd)/../../dist/sakia-${version}-py3-none-any.whl
# linuxdeploy appimage plugin
export OUTPUT=Sakia_x86_64.AppImage
[Desktop Entry]
Version=1.0
Name=Sakia
Name[fr]=Sakia
Comment=Duniter Ğ1 Libre Currency Client
Comment[fr]=Client pour la Monnaie Libre Duniter Ğ1
GenericName=Sakia client
GenericName[fr]=Client Sakia
Exec=sakia
Terminal=false
Type=Application
Icon=sakia
Categories=Utility;
StartupNotify=true
GenericName[fr_FR]=Client Sakia
Comment[fr_FR]=Client pour la Monnaie Libre Duniter Ğ1
MimeType=x-scheme-handler/duniter;
ci/appimage/sakia.png

51.5 KiB

#!/bin/bash
# Export APPRUN if running from an extracted image
self="$(readlink -f -- $0)"
here="${self%/*}"
APPDIR="${APPDIR:-${here}}"
# Call the entry point
${APPDIR}/usr/bin/python3.6 -s ${APPDIR}/usr/python/lib/python3.6/site-packages/sakia/main.py "$@"
...@@ -5,23 +5,24 @@ call activate test-environment ...@@ -5,23 +5,24 @@ call activate test-environment
echo "%PATH%" echo "%PATH%"
echo "%QT_PLUGIN_PATH%" echo "%QT_PLUGIN_PATH%"
python -V python -V
call pyuic5 --version
pyrcc5 -version
lrelease -version lrelease -version
pip install PyQt5 call pyuic5 --version
pyrcc5 -version
pip install -r requirements.txt pip install -r requirements.txt
pip install pyinstaller pip install pyinstaller==3.2
pip install six pip install six
pip install packaging pip install packaging
python gen_resources.py python gen_resources.py
if %errorlevel% neq 0 exit /b 1s if %errorlevel% neq 0 exit /b 1s
python gen_translations.py call .\\ci\\appveyor\\gen_translations.cmd
if %errorlevel% neq 0 exit /b 1 if %errorlevel% neq 0 exit /b 1
SET PATH=c:\\python35_64\\envs\\test-environment\\lib\\site-packages\\PyQt5\\Qt\\bin;%PATH%
pyinstaller sakia.spec pyinstaller sakia.spec
if %errorlevel% neq 0 exit /b 1 if %errorlevel% neq 0 exit /b 1
@ECHO ON
SET PREVPATH=%PATH%
SET PATH=%QTDIR%\\bin;%QTDIR%\\lib;%PATH%
lrelease -version
python gen_translations.py
if %errorlevel% neq 0 exit /b 1
SET PATH=%PREVPATH%
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#error "Unable to find MyAppExe" #error "Unable to find MyAppExe"
#endif #endif
#define MyAppVerStr "0.20.12" #define MyAppVerStr "0.53.2"
[Setup] [Setup]
AppName={#MyAppName} AppName={#MyAppName}
......
...@@ -4,6 +4,7 @@ call activate test-environment ...@@ -4,6 +4,7 @@ call activate test-environment
echo "%PATH%" echo "%PATH%"
echo "%QT_PLUGIN_PATH%" echo "%QT_PLUGIN_PATH%"
python -V python -V
call pyuic5 --version call pyuic5 --version
...@@ -11,8 +12,7 @@ pyrcc5 -version ...@@ -11,8 +12,7 @@ pyrcc5 -version
lrelease -version lrelease -version
echo "%CWD%" echo "%cd%"
py.test tests/
python setup.py test
if %errorlevel% neq 0 exit /b 1 if %errorlevel% neq 0 exit /b 1
\ No newline at end of file
#!/usr/bin/env bash #!/usr/bin/env bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)" eval "$(pyenv init -)"
cd $HOME/build/duniter/sakia cd $HOME/build/duniter/sakia
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
if [ $TRAVIS_OS_NAME == "osx" ] if [ $TRAVIS_OS_NAME == "osx" ]
then then
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/ zip -r sakia-${TRAVIS_OS_NAME}.zip dist/sakia.app/
elif [ $TRAVIS_OS_NAME == "linux" ] elif [ $TRAVIS_OS_NAME == "linux" ]
then then
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/ zip -r sakia-${TRAVIS_OS_NAME}.zip dist/sakia/
# Debian package # Debian package
chmod 755 ci/travis/debian/DEBIAN/post* chmod 755 ci/travis/debian/DEBIAN/post*
...@@ -14,7 +14,7 @@ then ...@@ -14,7 +14,7 @@ then
cp sakia.png ci/travis/debian/opt/sakia/ cp sakia.png ci/travis/debian/opt/sakia/
cp sakia-${TRAVIS_OS_NAME}.zip ci/travis/debian/opt/sakia/sakia.zip cp sakia-${TRAVIS_OS_NAME}.zip ci/travis/debian/opt/sakia/sakia.zip
cp -r res/linux/usr ci/travis/debian
fakeroot dpkg-deb --build ci/travis/debian fakeroot dpkg-deb --build ci/travis/debian
mv ci/travis/debian.deb sakia-${TRAVIS_OS_NAME}.deb mv ci/travis/debian.deb sakia-${TRAVIS_OS_NAME}.deb
fi fi
...@@ -11,50 +11,51 @@ fi ...@@ -11,50 +11,51 @@ fi
if [ $TRAVIS_OS_NAME == "osx" ] if [ $TRAVIS_OS_NAME == "osx" ]
then then
brew tap homebrew/versions
brew update brew update
brew install libsodium brew install libsodium
## Ensure your brew QT version is up to date. (brew install qt -> qt 4.8) ## Ensure your brew QT version is up to date. (brew install qt -> qt 4.8)
brew install qt5 brew install qt5
brew link --force qt5 brew list qt5
brew install pyenv-virtualenv brew install pyenv-virtualenv
pyenv update
elif [ $TRAVIS_OS_NAME == "linux" ] elif [ $TRAVIS_OS_NAME == "linux" ]
then then
sudo apt-get update sudo apt-get update
sudo apt-get install -qq -y libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 \ sudo apt-get install -qq -y libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 \
libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev \ libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev \
libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 \ libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 \
libxcb-render-util0-dev libxcb-glx0-dev libgl1-mesa-dri libegl1-mesa libpcre3-dev \ libxcb-render-util0-dev libxcb-glx0-dev libgl1-mesa-dri libegl1-mesa libpcre3 libgles2-mesa-dev \
curl libdbus-1-dev libdbus-glib-1-dev autoconf automake libtool libgstreamer-plugins-base0.10-0 freeglut3-dev libfreetype6-dev xorg-dev xserver-xorg-input-void xserver-xorg-video-dummy xpra libosmesa6-dev \
wget https://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run curl libdbus-1-dev libdbus-glib-1-dev autoconf automake libtool libgstreamer-plugins-base0.10-0 dunst fakeroot \
chmod +x qt-opensource-linux-x64-5.7.0.run dbus-x11
./qt-opensource-linux-x64-5.7.0.run --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs wget https://download.qt.io/official_releases/qt/5.9/5.9.4/qt-opensource-linux-x64-5.9.4.run
chmod +x qt-opensource-linux-x64-5.9.4.run
wget http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsodium/libsodium13_1.0.1-1_amd64.deb ./qt-opensource-linux-x64-5.9.4.run -v --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs
sudo dpkg -i libsodium13_1.0.1-1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsodium/libsodium18_1.0.13-1_amd64.deb
sudo dpkg -i libsodium18_1.0.13-1_amd64.deb
rm -r ~/.pyenv rm -r ~/.pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
ldconfig -p ldconfig -p
#export $(dbus-launch)
fi fi
eval "$(pyenv init -)" eval "$(pyenv init -)"
pyenv update
pyenv install --list pyenv install --list
if [ $TRAVIS_OS_NAME == "osx" ] if [ $TRAVIS_OS_NAME == "osx" ]
then then
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install $PYENV_PYTHON_VERSION env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install $PYENV_PYTHON_VERSION
elif [ $TRAVIS_OS_NAME == "linux" ] elif [ $TRAVIS_OS_NAME == "linux" ]
then then
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYENV_PYTHON_VERSION PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --force $PYENV_PYTHON_VERSION
fi fi
pyenv shell $PYENV_PYTHON_VERSION pyenv shell $PYENV_PYTHON_VERSION
pip install PyQt5 cd $HOME
make -j 2 && make install
pyenv rehash
#!/usr/bin/env bash #!/usr/bin/env bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)" eval "$(pyenv init -)"
cd $HOME/build/duniter/sakia cd $HOME/build/duniter/sakia
...@@ -8,20 +10,24 @@ pyenv shell $PYENV_PYTHON_VERSION ...@@ -8,20 +10,24 @@ pyenv shell $PYENV_PYTHON_VERSION
pip install --upgrade pip pip install --upgrade pip
pyenv rehash pyenv rehash
pip install coveralls pip install coveralls
pip install pyinstaller pip install pytest-cov
pip install pyinstaller==3.3.1
pip install wheel
pip install -r requirements.txt pip install -r requirements.txt
if [ $TRAVIS_OS_NAME == "linux" ] if [ $TRAVIS_OS_NAME == "linux" ]
then then
pip install -U git+https://github.com/posborne/dbus-python.git pip install -U git+https://github.com/posborne/dbus-python.git
pip install notify2 pip install notify2
export PATH=/tmp/qt/5.7/5.7/gcc_64/bin:$PATH export PATH=/tmp/qt/5.8/5.8/gcc_64/bin:$PATH
fi fi
if [ $TRAVIS_OS_NAME == "osx" ] if [ $TRAVIS_OS_NAME == "osx" ]
then then
brew link --force qt5
export PATH=/Users/travis/.pyenv/versions/$PYENV_PYTHON_VERSION/Python.framework/Versions/3.5/bin:$PATH export PATH=/Users/travis/.pyenv/versions/$PYENV_PYTHON_VERSION/Python.framework/Versions/3.5/bin:$PATH
fi fi
echo $PATH
python gen_resources.py python gen_resources.py
python gen_translations.py --lrelease python gen_translations.py --lrelease
...@@ -29,9 +35,11 @@ if [ $TRAVIS_OS_NAME == "osx" ] ...@@ -29,9 +35,11 @@ if [ $TRAVIS_OS_NAME == "osx" ]
then then
pyinstaller sakia.spec pyinstaller sakia.spec
cp -rv dist/sakia/* dist/sakia.app/Contents/MacOS cp -rv dist/sakia/* dist/sakia.app/Contents/MacOS
cp -v res/osx/Info.plist dist/sakia.app/Contents/
rm -rfv dist/sakia rm -rfv dist/sakia
elif [ $TRAVIS_OS_NAME == "linux" ] elif [ $TRAVIS_OS_NAME == "linux" ]
then then
pyinstaller sakia.spec pyinstaller sakia.spec
rm -f dist/sakia/libdrm.so.2
python setup.py bdist_wheel
fi fi