diff --git a/conda/environment.yml b/conda/environment.yml index aceaa5d..665eea5 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -1,5 +1,7 @@ name: mtg_dev channels: + - openalea3/label/dev + - openalea3/label/rc - openalea3 - conda-forge diff --git a/conda/meta.yaml b/conda/meta.yaml index 6b291b3..15eac79 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -20,7 +20,6 @@ build: noarch: python number: 0 preserve_egg_dir: True - string: py{{ PY_VER }} script: - {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv diff --git a/src/openalea/mtg/gui/mtg_editor.py b/src/openalea/mtg/gui/mtg_editor.py index d80903f..78d920f 100644 --- a/src/openalea/mtg/gui/mtg_editor.py +++ b/src/openalea/mtg/gui/mtg_editor.py @@ -176,15 +176,15 @@ def notify_edge_removals(self, edges): ############################################## # -- The graphical part of the MTG editor -- # ############################################## -from PyQt4 import QtGui, QtCore +from qtpy import QtGui, QtCore, QtWidgets class Vertex( qt.DefaultGraphicalVertex ): max_scale = 6 def __init__(self, *args, **kwargs): qt.DefaultGraphicalVertex.__init__(self, *args, **kwargs) - self.setFlag(QtGui.QGraphicsItem.ItemIsFocusable, True) - self._label = QtGui.QGraphicsSimpleTextItem(self) + self.setFlag(QtWidgets.QGraphicsItem.ItemIsFocusable, True) + self._label = QtWidgets.QGraphicsSimpleTextItem(self) def _mtg(self): return self.graph().graph @@ -401,10 +401,10 @@ def initialise_graph_view_from_model(graphView, graphModel): from random import randint as rint #THE APPLICATION'S MAIN WINDOW - class MainWindow(QtGui.QMainWindow): + class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent=None): """ """ - QtGui.QMainWindow.__init__(self, parent) + QtWidgets.QMainWindow.__init__(self, parent) self.setMinimumSize(800,600) self.__graph = ObservableMTG() @@ -413,8 +413,8 @@ def __init__(self, parent=None): self.setCentralWidget(self.__graphView) - app = QtGui.QApplication(["GraphEditor and Mtg test"]) - QtGui.QApplication.processEvents() + app = QtWidgets.QApplication(["GraphEditor and Mtg test"]) + QtWidgets.QApplication.processEvents() w = MainWindow() w.show() app.exec_() diff --git a/src/openalea/mtg_wralea/gui.py b/src/openalea/mtg_wralea/gui.py index dd532c8..0b24536 100644 --- a/src/openalea/mtg_wralea/gui.py +++ b/src/openalea/mtg_wralea/gui.py @@ -18,7 +18,7 @@ from openalea.visualea.node_widget import NodeWidget from openalea.mtg.gui.mtg_editor import GraphicalMtgFactory, ObservableMTG -from PyQt4 import QtGui +from qtpy import QtGui class MTGEditor(QtGui.QWidget, NodeWidget): def __init__(self, node, parent):