diff --git a/appveyor.yml b/appveyor.yml index dd6efecb5f9ebb74cd081aa15337ff6051a50220..33210cb61fdbb32e653fe7414a1e6eb0deceb418 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,31 +6,48 @@ environment: CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\appveyor\\run_with_env.cmd" matrix: - - PYTHON: "C:\\Python34_64" + - PYTHON: "C:\\Python35_64" PYTHON_VERSION: "3.5" PYTHON_ARCH: "64" - CONDA_PY: "34" + CONDA_PY: "35" CONDA_NPY: "18" + QTDIR: "C:\\Qt\\5.6\\5.6\\msvc2015_64" + QDOWNLOAD: "http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/qt-opensource-windows-x86-msvc2015_64-5.6.0-beta.exe" + QINSTALLER: "qt-opensource-windows-x86-msvc2015_64-5.6.0-beta.exe" platform: x64 - - PYTHON: "C:\\Python34_32" + - PYTHON: "C:\\Python35_32" PYTHON_VERSION: "3.5" PYTHON_ARCH: "32" - CONDA_PY: "34" + CONDA_PY: "35" CONDA_NPY: "18" + QTDIR: "C:\\Qt\\5.6\\5.6\\msvc2015" + QDOWNLOAD: "http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/qt-opensource-windows-x86-msvc2015-5.6.0-beta.exe" + QINSTALLER: "qt-opensource-windows-x86-msvc2015-5.6.0-beta.exe" platform: x86 install: # this installs the appropriate Miniconda (Py2/Py3, 32/64 bit), # as well as pip, conda-build, and the binstar CLI - powershell .\\ci\\appveyor\\install.ps1 + + - IF NOT EXIST C:\Qt\5.6\5.6 curl -kLO %QDOWNLOAD% + - IF NOT EXIST C:\Qt\5.6\5.6 %QINSTALLER% --script ci\appveyor\qt-installer-noninteractive.qs + # - dir /b /s /ad c:\Qt + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - "IF EXIST %QTDIR%\\include\\QtNfc MOVE %QTDIR%\\include\\QtNfc %QTDIR%\\include\\QtNfc-disable" + # Add qt to path + - "set PATH=%QTDIR%\\bin;%PATH%" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - - "SET QT_QPA_PLATFORM_PLUGIN_PATH=%PYTHON%\\envs\\test-environment\\Scripts\\plugins" - - choco install -y vcredist2013 + - "SET QT_QPA_PLATFORM_PLUGIN_PATH=C:\\Qt\\5.6\\5.6\\msvc_2015\\plugins\\platforms" + - choco install -y vcredist2015 - "%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 pyzo" - - "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% cx_freeze pyqt5 libsodium=1.0.3" + - "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% pyqt5 libsodium=1.0.3" + +cache: + - C:\Qt\5.6\5.6 build_script: - ".\\ci\\appveyor\\build.cmd" diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index bd4410c0b09eb36a4b4391aff179bddf92770125..a0a08f12fce58868a96b3fd4549bdf4d7785f286 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -19,5 +19,5 @@ if %errorlevel% neq 0 exit /b 1s python gen_translations.py if %errorlevel% neq 0 exit /b 1 -python setup.py build -if %errorlevel% neq 0 exit /b 1 +@REM python setup.py build +@REM if %errorlevel% neq 0 exit /b 1 diff --git a/ci/appveyor/qt-installer-noninteractive.qs b/ci/appveyor/qt-installer-noninteractive.qs new file mode 100644 index 0000000000000000000000000000000000000000..9df892cdb83b2576853b6e9be5697dc049f3c04e --- /dev/null +++ b/ci/appveyor/qt-installer-noninteractive.qs @@ -0,0 +1,56 @@ +// Emacs mode hint: -*- mode: JavaScript -*- + +function Controller() { + installer.autoRejectMessageBoxes(); + installer.installationFinished.connect(function() { + gui.clickButton(buttons.NextButton); + }) +} + +Controller.prototype.WelcomePageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.CredentialsPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.IntroductionPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.TargetDirectoryPageCallback = function() +{ + gui.currentPageWidget().TargetDirectoryLineEdit.setText("C:\\Qt\\5.6"); + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ComponentSelectionPageCallback = function() { + //var widget = gui.currentPageWidget(); + + //widget.selectAll(); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.LicenseAgreementPageCallback = function() { + gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.StartMenuDirectoryPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ReadyForInstallationPageCallback = function() +{ + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.FinishedPageCallback = function() { +var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm +if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { + checkBoxForm.launchQtCreatorCheckBox.checked = false; +} + gui.clickButton(buttons.FinishButton); +} diff --git a/ci/travis/before_install.sh b/ci/travis/before_install.sh index 679c5c359219d24967e843e06b2d05d009335b17..138c534229a51d718af042f14705770d15663745 100755 --- a/ci/travis/before_install.sh +++ b/ci/travis/before_install.sh @@ -57,10 +57,18 @@ then pyenv activate sakia-env if [ $TRAVIS_OS_NAME == "osx" ] then - python configure.py --confirm-license + python configure.py --confirm-license \ + --enable QtCore \ + --enable QtWidgets \ + --enable QtGui \ + --enable QtSvg elif [ $TRAVIS_OS_NAME == "linux" ] then - python configure.py --qmake "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" --confirm-license + python configure.py --qmake "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" --confirm-license \ + --enable QtCore \ + --enable QtWidgets \ + --enable QtGui \ + --enable QtSvg fi make -j 2 && make install diff --git a/setup.py b/setup.py index dca0a8308b46987df54a3e7daafef65b5270428c..fd9ca187bd8b116e0c17237eca9b51c63b03c5ad 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ import sys, os, subprocess, multiprocessing, site -from cx_Freeze import setup, Executable from PyQt5 import QtCore from os import listdir from os.path import isfile, join @@ -13,6 +12,7 @@ if "test" in sys.argv: sys.exit(not runner.wasSuccessful()) else: + from cx_Freeze import setup, Executable print(sys.path) print("Environnement:") print(os.environ) diff --git a/src/sakia/core/net/api/bma/access.py b/src/sakia/core/net/api/bma/access.py index f6d645e0654bb49e83a9d06ca12512a7def01d16..9324a38266a973e96746613dd1042329166b878e 100644 --- a/src/sakia/core/net/api/bma/access.py +++ b/src/sakia/core/net/api/bma/access.py @@ -1,5 +1,4 @@ from PyQt5.QtCore import QObject, pyqtSlot -from PyQt5.QtNetwork import QNetworkReply from ucoinpy.api import bma from .....tools.exceptions import NoPeerAvailable from ..... import __version__ @@ -259,7 +258,7 @@ class BmaAccess(QObject): :param class request: A bma request class calling for data :param dict req_args: Arguments to pass to the request constructor :param dict get_args: Arguments to pass to the request __get__ method - :return: The returned data if cached = True else return the QNetworkReply + :return: The returned data """ nodes = self.filter_nodes(request, self._network.synced_nodes) if len(nodes) > 0: @@ -293,7 +292,7 @@ class BmaAccess(QObject): :param req_args: Arguments to pass to the request constructor :param post_args: Arguments to pass to the request __post__ method :return: All nodes replies - :rtype: tuple of QNetworkReply + :rtype: tuple of aiohttp replies .. note:: If one node accept the requests (returns 200), the broadcast should be considered accepted by the network. diff --git a/src/sakia/core/registry/identities.py b/src/sakia/core/registry/identities.py index bb2608e906e0e2277c22e80da3320d5d031e1d13..8ef736f2ead3abbbc9caff83b9c21c6f1f494651 100644 --- a/src/sakia/core/registry/identities.py +++ b/src/sakia/core/registry/identities.py @@ -1,4 +1,3 @@ -from PyQt5.QtNetwork import QNetworkReply, QNetworkRequest from ucoinpy.api import bma from .identity import Identity, LocalState, BlockchainState diff --git a/src/sakia/tests/functional/main_window/test_main_window_dialogs.py b/src/sakia/tests/functional/main_window/test_main_window_dialogs.py index 97d0a5f88887c751ea286230f6992c21a21bc2ae..2c054c338787e757bb59fd8cfa7f48b42a255144 100644 --- a/src/sakia/tests/functional/main_window/test_main_window_dialogs.py +++ b/src/sakia/tests/functional/main_window/test_main_window_dialogs.py @@ -1,9 +1,6 @@ import unittest -import asyncio -import quamash from PyQt5.QtWidgets import QDialog, QFileDialog from PyQt5.QtCore import QLocale, QTimer -from PyQt5.QtNetwork import QNetworkAccessManager from sakia.gui.mainwindow import MainWindow from sakia.core.app import Application from sakia.tests import QuamashTest