From 0bfae1d651f22663e6399cfb2106a460b843861d Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Mon, 10 Jan 2022 08:20:50 +0900 Subject: [PATCH 1/2] Updated the build system for Mac. --- macbuild/build4mac.py | 47 +++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/macbuild/build4mac.py b/macbuild/build4mac.py index 075a7ef44..d2f97b363 100755 --- a/macbuild/build4mac.py +++ b/macbuild/build4mac.py @@ -143,29 +143,36 @@ def Get_Default_Config(): Usage, ModuleSet = GenerateUsage(Platform) # Set the default modules - ModuleQt = "Qt5MacPorts" if Platform == "Monterey": + ModuleQt = "Qt5Brew" ModuleRuby = "RubyMonterey" ModulePython = "PythonMonterey" elif Platform == "BigSur": + ModuleQt = "Qt5Brew" ModuleRuby = "RubyBigSur" ModulePython = "PythonBigSur" elif Platform == "Catalina": + ModuleQt = "Qt5MacPorts" ModuleRuby = "RubyCatalina" ModulePython = "PythonCatalina" elif Platform == "Mojave": + ModuleQt = "Qt5MacPorts" ModuleRuby = "RubyMojave" ModulePython = "PythonMojave" elif Platform == "HighSierra": + ModuleQt = "Qt5MacPorts" ModuleRuby = "RubyHighSierra" ModulePython = "PythonHighSierra" elif Platform == "Sierra": + ModuleQt = "Qt5MacPorts" ModuleRuby = "RubySierra" ModulePython = "PythonSierra" elif Platform == "ElCapitan": + ModuleQt = "Qt5MacPorts" ModuleRuby = "RubyElCapitan" ModulePython = "PythonElCapitan" else: + ModuleQt = "Qt5MacPorts" ModuleRuby = "nil" ModulePython = "nil" @@ -306,18 +313,32 @@ def Parse_CLI_Args(config): default=False, help='check usage' ) - p.set_defaults( type_qt = "qt5macports", - type_ruby = "sys", - type_python = "sys", - no_qt_binding = False, - no_qt_uitools = False, - make_option = "--jobs=4", - debug_build = False, - check_command = False, - deploy_full = False, - deploy_partial = False, - deploy_verbose = "1", - checkusage = False ) + if Platform.upper() in [ "MONTEREY", "BIGSUR" ]: # with Xcode [13.1 .. ] + p.set_defaults( type_qt = "qt5brew", + type_ruby = "hb27", + type_python = "hb38", + no_qt_binding = False, + no_qt_uitools = False, + make_option = "--jobs=4", + debug_build = False, + check_command = False, + deploy_full = False, + deploy_partial = False, + deploy_verbose = "1", + checkusage = False ) + else: # with Xcode [ .. 12.4] + p.set_defaults( type_qt = "qt5macports", + type_ruby = "sys", + type_python = "sys", + no_qt_binding = False, + no_qt_uitools = False, + make_option = "--jobs=4", + debug_build = False, + check_command = False, + deploy_full = False, + deploy_partial = False, + deploy_verbose = "1", + checkusage = False ) opt, args = p.parse_args() if (opt.checkusage): From df60f49276ace0dbb240d661814d8be78ae8a09b Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 12 Jan 2022 22:49:20 +0100 Subject: [PATCH 2/2] Fixed issue-969 plus a Qt warning --- src/db/db/gsiDeclDbLibrary.cc | 1 + src/edt/edt/edtPCellParametersPage.cc | 2 +- testdata/python/dbPCells.py | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/db/db/gsiDeclDbLibrary.cc b/src/db/db/gsiDeclDbLibrary.cc index d55387728..1b5439da3 100644 --- a/src/db/db/gsiDeclDbLibrary.cc +++ b/src/db/db/gsiDeclDbLibrary.cc @@ -455,6 +455,7 @@ Class decl_PCellDeclaration (decl_PCellDeclaration_Native, gsi::method ("parameters_from_shape", &PCellDeclarationImpl::parameters_from_shape_fb, "@hide") + gsi::method ("transformation_from_shape", &PCellDeclarationImpl::transformation_from_shape_fb, "@hide") + gsi::method ("display_text", &PCellDeclarationImpl::get_display_name_fb, "@hide") + + gsi::method ("wants_lazy_evaluation", &PCellDeclarationImpl::wants_lazy_evaluation_fb, "@hide") + gsi::callback ("get_layers", &PCellDeclarationImpl::get_layer_declarations_impl, &PCellDeclarationImpl::cb_get_layer_declarations, gsi::arg ("parameters"), "@brief Returns a list of layer declarations\n" "Reimplement this method to return a list of layers this PCell wants to create.\n" diff --git a/src/edt/edt/edtPCellParametersPage.cc b/src/edt/edt/edtPCellParametersPage.cc index df8000413..985c63f27 100644 --- a/src/edt/edt/edtPCellParametersPage.cc +++ b/src/edt/edt/edtPCellParametersPage.cc @@ -201,7 +201,7 @@ PCellParametersPage::init () mp_error_frame->setFrameShape (QFrame::NoFrame); frame_layout->addWidget (mp_error_frame, 1, 0, 1, 1); - QGridLayout *error_frame_layout = new QGridLayout (mp_update_frame); + QGridLayout *error_frame_layout = new QGridLayout (mp_error_frame); mp_error_frame->setLayout (error_frame_layout); if (m_dense) { error_frame_layout->setMargin (4); diff --git a/testdata/python/dbPCells.py b/testdata/python/dbPCells.py index 526208e26..8d16caa77 100644 --- a/testdata/python/dbPCells.py +++ b/testdata/python/dbPCells.py @@ -99,6 +99,9 @@ if "PCellDeclarationHelper" in pya.__dict__: # provide a descriptive text for the cell return "Box2(L=" + str(self.layer) + ",W=" + ('%.3f' % self.width) + ",H=" + ('%.3f' % self.height) + ")" + def wants_lazy_evaluation(self): + return True + def produce_impl(self): dbu = self.layout.dbu @@ -197,6 +200,7 @@ class DBPCellTests(unittest.TestCase): self.assertEqual(pcell_var.is_pcell_variant(), True) self.assertEqual(pcell_var.display_title(), "PCellTestLib.Box(L=1/0,W=1.000,H=1.000)") self.assertEqual(pcell_var.basic_name(), "Box") + self.assertEqual(pcell_var.pcell_declaration().wants_lazy_evaluation(), False) self.assertEqual(c1.is_pcell_variant(), False) self.assertEqual(c1.is_pcell_variant(pcell_inst), True) self.assertEqual(pcell_var.pcell_id(), pcell_decl_id) @@ -343,6 +347,7 @@ class DBPCellTests(unittest.TestCase): self.assertEqual(pcell_var.pcell_declaration().__repr__(), pcell_decl.__repr__()) self.assertEqual(c1.pcell_declaration(pcell_inst).__repr__(), pcell_decl.__repr__()) self.assertEqual(pcell_inst.pcell_declaration().__repr__(), pcell_decl.__repr__()) + self.assertEqual(pcell_decl.wants_lazy_evaluation(), True) li1 = find_layer(ly, "1/0") self.assertEqual(li1 == None, False) @@ -490,7 +495,6 @@ class DBPCellTests(unittest.TestCase): self.assertEqual(cell.begin_shapes_rec(ly.layer(5, 0)).shape().__str__(), "box (-100,-300;100,300)") - # run unit tests if __name__ == '__main__': suite = unittest.TestLoader().loadTestsFromTestCase(DBPCellTests)