From beb80ca24dbeaa00b249fe954390e6195399ceb6 Mon Sep 17 00:00:00 2001 From: baugetfa Date: Tue, 30 Sep 2025 10:09:29 +0200 Subject: [PATCH 1/2] deleted string: py{{ PY_VER }} as recommanded and environment.yml channel dev and rc --- conda/environment.yml | 2 ++ conda/meta.yaml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) 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 From f7e9def8a7b84d1329f3959a3b03ac9f44b69c9f Mon Sep 17 00:00:00 2001 From: baugetfa Date: Tue, 30 Sep 2025 13:42:20 +0200 Subject: [PATCH 2/2] corrected PyQt4 left not sure that mtg_editor.py and mtg_wralea/gui.py are still used --- src/openalea/mtg/gui/mtg_editor.py | 14 +++++++------- src/openalea/mtg_wralea/gui.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) 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):