Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packaging: qt5 & pyface/traitsui 6 updates
- Loading branch information
Showing
27 changed files
with
316 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from PyInstaller.utils.hooks import copy_metadata | ||
datas = copy_metadata('pyface') + copy_metadata('traitsui') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from PyInstaller.utils.hooks import copy_metadata | ||
datas = copy_metadata('traitsui') + copy_metadata('pyface') | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,3 @@ | ||
# from PyInstaller.compat import is_darwin | ||
from PyInstaller.utils.hooks import (logger, collect_data_files, | ||
collect_submodules) | ||
import os | ||
|
||
# get some missing datas and dynamically loaded submodules | ||
datas = collect_data_files('pyface', 'images') | ||
hiddenimports = collect_submodules("pyface") | ||
# | ||
# hiddenimports = collect_submodules("pyface", subdir = os.path.join("ui", "qt4")) | ||
# hiddenimports.extend(collect_submodules("pyface", subdir = os.path.join("ui", "qt4", "action"))) | ||
# hiddenimports.extend(collect_submodules("pyface", subdir = os.path.join("ui", "qt4", "tasks"))) | ||
|
||
from PyInstaller.utils.hooks import copy_metadata | ||
datas = copy_metadata('pyface') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from PyInstaller.utils.hooks import copy_metadata | ||
datas = copy_metadata('traits') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from PyInstaller.utils.hooks import copy_metadata | ||
datas = copy_metadata('traitsui') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtCore import * | ||
|
||
from PyQt4.QtCore import pyqtProperty as Property | ||
from PyQt4.QtCore import pyqtSignal as Signal | ||
from PyQt4.QtCore import pyqtSlot as Slot | ||
from PyQt4.QtCore import QCoreApplication | ||
|
||
__version__ = QT_VERSION_STR | ||
__version_info__ = tuple(map(int, QT_VERSION_STR.split('.'))) | ||
|
||
else: | ||
try: | ||
from PySide import __version__, __version_info__ | ||
except ImportError: | ||
pass | ||
from PySide.QtCore import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtGui import * | ||
|
||
else: | ||
from PySide.QtGui import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtNetwork import * | ||
|
||
else: | ||
from PySide.QtNetwork import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtOpenGL import * | ||
|
||
else: | ||
from PySide.QtOpenGL import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtScript import * | ||
|
||
else: | ||
from PySide.QtScript import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtSvg import * | ||
|
||
else: | ||
from PySide.QtSvg import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtTest import * | ||
|
||
else: | ||
from PySide.QtTest import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.QtWebKit import * | ||
|
||
else: | ||
from PySide.QtWebKit import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2010, Enthought Inc | ||
# All rights reserved. | ||
# | ||
# This software is provided without warranty under the terms of the BSD license. | ||
|
||
# | ||
# Author: Enthought Inc | ||
# Description: Qt API selector. Can be used to switch between pyQt and PySide | ||
#------------------------------------------------------------------------------ | ||
|
||
import os | ||
|
||
def prepare_pyqt4(): | ||
# Set PySide compatible APIs. | ||
import sip | ||
sip.setapi('QString', 2) | ||
sip.setapi('QVariant', 2) | ||
|
||
qt_api = os.environ.get('QT_API') | ||
|
||
if qt_api is None: | ||
try: | ||
import PySide | ||
qt_api = 'pyside' | ||
except ImportError: | ||
try: | ||
prepare_pyqt4() | ||
import PyQt4 | ||
qt_api = 'pyqt' | ||
except ImportError: | ||
raise ImportError('Cannot import PySide or PyQt4') | ||
|
||
elif qt_api == 'pyqt': | ||
prepare_pyqt4() | ||
|
||
elif qt_api != 'pyside': | ||
raise RuntimeError("Invalid Qt API %r, valid values are: 'pyqt' or 'pyside'" | ||
% qt_api) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
from . import qt_api | ||
|
||
if qt_api == 'pyqt': | ||
from PyQt4.Qt import QKeySequence, QTextCursor | ||
from PyQt4.QtGui import * | ||
|
||
|
||
elif qt_api == 'pyqt5': | ||
from PyQt5.QtGui import * | ||
from PyQt5.QtWidgets import * | ||
from PyQt5.QtPrintSupport import * | ||
from PyQt5.QtCore import ( | ||
QAbstractProxyModel, QItemSelection, QItemSelectionModel, | ||
QItemSelectionRange, QSortFilterProxyModel, QStringListModel | ||
) | ||
|
||
elif qt_api == 'pyside2': | ||
from PySide2.QtGui import * | ||
from PySide2.QtWidgets import * | ||
from PySide2.QtPrintSupport import * | ||
from PySide2.QtCore import ( | ||
QAbstractProxyModel, QItemSelection, QItemSelectionModel, | ||
QItemSelectionRange, QSortFilterProxyModel | ||
) | ||
|
||
else: | ||
from PySide.QtGui import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.