From bc153364a006f497e0033e9e270edfe60542d9bf Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:28:36 +0100 Subject: [PATCH 01/14] updating CompressibleFlowApp --- .../CompressiblePotentialFlowApplication/CMakeLists.txt | 2 +- .../__init__.py => CompressiblePotentialFlowApplication.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/CompressiblePotentialFlowApplication/{python_scripts/__init__.py => CompressiblePotentialFlowApplication.py} (100%) diff --git a/applications/CompressiblePotentialFlowApplication/CMakeLists.txt b/applications/CompressiblePotentialFlowApplication/CMakeLists.txt index a5271432bb4c..6bec703dce62 100644 --- a/applications/CompressiblePotentialFlowApplication/CMakeLists.txt +++ b/applications/CompressiblePotentialFlowApplication/CMakeLists.txt @@ -40,4 +40,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/CompressiblePotentialFlowApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/CompressiblePotentialFlowApplication.py" DESTINATION "KratosMultiphysics/CompressiblePotentialFlowApplication" RENAME "__init__.py") diff --git a/applications/CompressiblePotentialFlowApplication/python_scripts/__init__.py b/applications/CompressiblePotentialFlowApplication/CompressiblePotentialFlowApplication.py similarity index 100% rename from applications/CompressiblePotentialFlowApplication/python_scripts/__init__.py rename to applications/CompressiblePotentialFlowApplication/CompressiblePotentialFlowApplication.py From 479a46258db758310c6952703fb66acb47728741 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:28:54 +0100 Subject: [PATCH 02/14] Updating ContactStructMech --- .../ContactStructuralMechanicsApplication/CMakeLists.txt | 2 +- .../{python_scripts => }/__init__.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/ContactStructuralMechanicsApplication/{python_scripts => }/__init__.py (100%) diff --git a/applications/ContactStructuralMechanicsApplication/CMakeLists.txt b/applications/ContactStructuralMechanicsApplication/CMakeLists.txt index 252ee187b2ce..79364a631f3e 100644 --- a/applications/ContactStructuralMechanicsApplication/CMakeLists.txt +++ b/applications/ContactStructuralMechanicsApplication/CMakeLists.txt @@ -103,4 +103,4 @@ endif(USE_COTIRE MATCHES ON) install(TARGETS KratosContactStructuralMechanicsApplication DESTINATION libs ) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/ContactStructuralMechanicsApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ContactStructuralMechanicsApplication.py" DESTINATION "KratosMultiphysics/ContactStructuralMechanicsApplication" RENAME "__init__.py") diff --git a/applications/ContactStructuralMechanicsApplication/python_scripts/__init__.py b/applications/ContactStructuralMechanicsApplication/__init__.py similarity index 100% rename from applications/ContactStructuralMechanicsApplication/python_scripts/__init__.py rename to applications/ContactStructuralMechanicsApplication/__init__.py From 45b8fbdb1a3ad1130560ba63f3075fdbf2414f8c Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:29:10 +0100 Subject: [PATCH 03/14] UpdatingEigenSolversApp --- applications/EigenSolversApplication/CMakeLists.txt | 2 +- .../{python_scripts/__init__.py => EigenSolversApplication.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/EigenSolversApplication/{python_scripts/__init__.py => EigenSolversApplication.py} (100%) diff --git a/applications/EigenSolversApplication/CMakeLists.txt b/applications/EigenSolversApplication/CMakeLists.txt index 8db03fad1fb2..358978d14800 100644 --- a/applications/EigenSolversApplication/CMakeLists.txt +++ b/applications/EigenSolversApplication/CMakeLists.txt @@ -82,4 +82,4 @@ if(USE_COTIRE MATCHES ON) endif(USE_COTIRE MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/EigenSolversApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/EigenSolversApplication.py" DESTINATION "KratosMultiphysics/EigenSolversApplication" RENAME "__init__.py") diff --git a/applications/EigenSolversApplication/python_scripts/__init__.py b/applications/EigenSolversApplication/EigenSolversApplication.py similarity index 100% rename from applications/EigenSolversApplication/python_scripts/__init__.py rename to applications/EigenSolversApplication/EigenSolversApplication.py From 125f7efc113a03dc36918c74242adcfff76850ac Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:29:23 +0100 Subject: [PATCH 04/14] Updating EmpireApp --- applications/EmpireApplication/CMakeLists.txt | 2 +- .../{python_scripts/__init__.py => EmpireApplication.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/EmpireApplication/{python_scripts/__init__.py => EmpireApplication.py} (100%) diff --git a/applications/EmpireApplication/CMakeLists.txt b/applications/EmpireApplication/CMakeLists.txt index 7f05c91dda84..eee119a582db 100644 --- a/applications/EmpireApplication/CMakeLists.txt +++ b/applications/EmpireApplication/CMakeLists.txt @@ -38,4 +38,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/EmpireApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/EmpireApplication.py" DESTINATION "KratosMultiphysics/EmpireApplication" RENAME "__init__.py") diff --git a/applications/EmpireApplication/python_scripts/__init__.py b/applications/EmpireApplication/EmpireApplication.py similarity index 100% rename from applications/EmpireApplication/python_scripts/__init__.py rename to applications/EmpireApplication/EmpireApplication.py From 198e4dd46e9f13549453807b87ab1b0568bb3d92 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:29:38 +0100 Subject: [PATCH 05/14] Updating ExternalSolversApp --- applications/ExternalSolversApplication/CMakeLists.txt | 2 +- .../ExternalSolversApplication/ExternalSolversApplication.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/ExternalSolversApplication/CMakeLists.txt b/applications/ExternalSolversApplication/CMakeLists.txt index 35cc79f9a018..90ca33c1ce5c 100644 --- a/applications/ExternalSolversApplication/CMakeLists.txt +++ b/applications/ExternalSolversApplication/CMakeLists.txt @@ -97,7 +97,7 @@ endif(USE_COTIRE MATCHES ON) install(TARGETS KratosExternalSolversApplication DESTINATION libs ) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ExternalSolversApplication.py" DESTINATION KratosMultiphysics ) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ExternalSolversApplication.py" DESTINATION "KratosMultiphysics/ExternalSolversApplication" RENAME "__init__.py") #if(${INCLUDE_PASTIX} MATCHES ON) # install( TARGETS kratos_pastix DESTINATION libs) diff --git a/applications/ExternalSolversApplication/ExternalSolversApplication.py b/applications/ExternalSolversApplication/ExternalSolversApplication.py index 33db5760b87c..ce7b27b5541e 100644 --- a/applications/ExternalSolversApplication/ExternalSolversApplication.py +++ b/applications/ExternalSolversApplication/ExternalSolversApplication.py @@ -5,7 +5,7 @@ application_folder = "ExternalSolversApplication" # The following lines are common for all applications -from . import application_importer +from .. import application_importer import inspect caller = inspect.stack()[1] # Information about the file that imported this, to check for unexpected imports -application_importer.ImportApplication(application, application_name, application_folder, caller) +application_importer.ImportApplication(application, application_name, application_folder, caller, __path__) From 493d70592e05f2815532453faba4989c3ab8f4d1 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:29:49 +0100 Subject: [PATCH 06/14] Updating FluidDyn --- applications/FluidDynamicsApplication/CMakeLists.txt | 2 +- .../{python_scripts/__init__.py => FluidDynamicsApplication.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/FluidDynamicsApplication/{python_scripts/__init__.py => FluidDynamicsApplication.py} (100%) diff --git a/applications/FluidDynamicsApplication/CMakeLists.txt b/applications/FluidDynamicsApplication/CMakeLists.txt index 89de1cbf4b1e..959e26172b9f 100644 --- a/applications/FluidDynamicsApplication/CMakeLists.txt +++ b/applications/FluidDynamicsApplication/CMakeLists.txt @@ -127,7 +127,7 @@ install(TARGETS KratosFluidDynamicsCore DESTINATION libs ) install(TARGETS KratosFluidDynamicsApplication DESTINATION libs ) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION KratosMultiphysics/FluidDynamicsApplication ) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/FluidDynamicsApplication.py" DESTINATION "KratosMultiphysics/FluidDynamicsApplication" RENAME "__init__.py") if(${INSTALL_PYTHON_FILES} MATCHES ON) get_filename_component (CURRENT_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) diff --git a/applications/FluidDynamicsApplication/python_scripts/__init__.py b/applications/FluidDynamicsApplication/FluidDynamicsApplication.py similarity index 100% rename from applications/FluidDynamicsApplication/python_scripts/__init__.py rename to applications/FluidDynamicsApplication/FluidDynamicsApplication.py From c8ee9b048af7ad1216ce1edcbaa309a326d1b89d Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:30:12 +0100 Subject: [PATCH 07/14] Updating HDF5App --- applications/HDF5Application/CMakeLists.txt | 2 +- .../{python_scripts/__init__.py => HDF5Application.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/HDF5Application/{python_scripts/__init__.py => HDF5Application.py} (100%) diff --git a/applications/HDF5Application/CMakeLists.txt b/applications/HDF5Application/CMakeLists.txt index df46533d6638..c448094d1aec 100644 --- a/applications/HDF5Application/CMakeLists.txt +++ b/applications/HDF5Application/CMakeLists.txt @@ -115,4 +115,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/HDF5Application") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/HDF5Application.py" DESTINATION "KratosMultiphysics/HDF5Application" RENAME "__init__.py") diff --git a/applications/HDF5Application/python_scripts/__init__.py b/applications/HDF5Application/HDF5Application.py similarity index 100% rename from applications/HDF5Application/python_scripts/__init__.py rename to applications/HDF5Application/HDF5Application.py From 4c51745f32911ce8451ad9abad1f2cb77bd5b042 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:30:21 +0100 Subject: [PATCH 08/14] Updating MeshMovingApp --- applications/MappingApplication/CMakeLists.txt | 2 +- applications/MappingApplication/MappingApplication.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/MappingApplication/CMakeLists.txt b/applications/MappingApplication/CMakeLists.txt index 624725df1e2f..9bf51a50bace 100644 --- a/applications/MappingApplication/CMakeLists.txt +++ b/applications/MappingApplication/CMakeLists.txt @@ -77,4 +77,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/MappingApplication.py" DESTINATION KratosMultiphysics ) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/MappingApplication.py" DESTINATION "KratosMultiphysics/MappingApplication" RENAME "__init__.py") diff --git a/applications/MappingApplication/MappingApplication.py b/applications/MappingApplication/MappingApplication.py index 258ca3a6743f..dd003f9aade9 100644 --- a/applications/MappingApplication/MappingApplication.py +++ b/applications/MappingApplication/MappingApplication.py @@ -8,10 +8,10 @@ application_folder = "MappingApplication" # The following lines are common for all applications -from . import application_importer +from .. import application_importer import inspect caller = inspect.stack()[1] # Information about the file that imported this, to check for unexpected imports -application_importer.ImportApplication(application,application_name,application_folder,caller) +application_importer.ImportApplication(application,application_name,application_folder,caller,__path__) ''' TODO: From 412f503ccb8e3a9491e0d3c9ed9499749d884e52 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:30:34 +0100 Subject: [PATCH 09/14] Updatin MappingApp --- applications/MeshMovingApplication/CMakeLists.txt | 2 +- .../MeshMovingApplication/MeshMovingApplication.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 applications/MeshMovingApplication/MeshMovingApplication.py diff --git a/applications/MeshMovingApplication/CMakeLists.txt b/applications/MeshMovingApplication/CMakeLists.txt index 73afef1c116d..febbb0b1ab92 100644 --- a/applications/MeshMovingApplication/CMakeLists.txt +++ b/applications/MeshMovingApplication/CMakeLists.txt @@ -51,4 +51,4 @@ endif(USE_COTIRE MATCHES ON) install(TARGETS KratosMeshMovingApplication DESTINATION libs ) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/MeshMovingApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/MeshMovingApplication.py" DESTINATION "KratosMultiphysics/MeshMovingApplication" RENAME "__init__.py") diff --git a/applications/MeshMovingApplication/MeshMovingApplication.py b/applications/MeshMovingApplication/MeshMovingApplication.py new file mode 100644 index 000000000000..2a92b46988a0 --- /dev/null +++ b/applications/MeshMovingApplication/MeshMovingApplication.py @@ -0,0 +1,11 @@ +from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 +from KratosMeshMovingApplication import * +application = KratosMeshMovingApplication() +application_name = "KratosMeshMovingApplication" +application_folder = "MeshMovingApplication" + +# The following lines are common for all applications +from .. import application_importer +import inspect +caller = inspect.stack()[1] # Information about the file that imported this, to check for unexpected imports +application_importer.ImportApplication(application, application_name, application_folder, caller, __path__) From bfb3be0cd127366d506620124fd2480629b770c4 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:30:45 +0100 Subject: [PATCH 10/14] Updating ShapeOptAp --- .../MeshMovingApplication/python_scripts/__init__.py | 11 ----------- .../ShapeOptimizationApplication/CMakeLists.txt | 2 +- .../__init__.py => ShapeOptimizationApplication.py} | 0 3 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 applications/MeshMovingApplication/python_scripts/__init__.py rename applications/ShapeOptimizationApplication/{python_scripts/__init__.py => ShapeOptimizationApplication.py} (100%) diff --git a/applications/MeshMovingApplication/python_scripts/__init__.py b/applications/MeshMovingApplication/python_scripts/__init__.py deleted file mode 100644 index 2a92b46988a0..000000000000 --- a/applications/MeshMovingApplication/python_scripts/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 -from KratosMeshMovingApplication import * -application = KratosMeshMovingApplication() -application_name = "KratosMeshMovingApplication" -application_folder = "MeshMovingApplication" - -# The following lines are common for all applications -from .. import application_importer -import inspect -caller = inspect.stack()[1] # Information about the file that imported this, to check for unexpected imports -application_importer.ImportApplication(application, application_name, application_folder, caller, __path__) diff --git a/applications/ShapeOptimizationApplication/CMakeLists.txt b/applications/ShapeOptimizationApplication/CMakeLists.txt index f78bf84043bd..40d1d4d50326 100644 --- a/applications/ShapeOptimizationApplication/CMakeLists.txt +++ b/applications/ShapeOptimizationApplication/CMakeLists.txt @@ -47,4 +47,4 @@ endif(${INSTALL_TESTING_FILES} MATCHES ON) # message("TestApplication subdir inc_dirs = ${inc_dirs}") # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/ShapeOptimizationApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ShapeOptimizationApplication.py" DESTINATION "KratosMultiphysics/ShapeOptimizationApplication" RENAME "__init__.py") diff --git a/applications/ShapeOptimizationApplication/python_scripts/__init__.py b/applications/ShapeOptimizationApplication/ShapeOptimizationApplication.py similarity index 100% rename from applications/ShapeOptimizationApplication/python_scripts/__init__.py rename to applications/ShapeOptimizationApplication/ShapeOptimizationApplication.py From 4b0feb5d99724b7aebec535582f0aeed92d1fc50 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:30:53 +0100 Subject: [PATCH 11/14] Updating StructMech --- applications/StructuralMechanicsApplication/CMakeLists.txt | 2 +- .../{python_scripts => }/__init__.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/StructuralMechanicsApplication/{python_scripts => }/__init__.py (100%) diff --git a/applications/StructuralMechanicsApplication/CMakeLists.txt b/applications/StructuralMechanicsApplication/CMakeLists.txt index 05d6bdc671a2..2588602190d6 100644 --- a/applications/StructuralMechanicsApplication/CMakeLists.txt +++ b/applications/StructuralMechanicsApplication/CMakeLists.txt @@ -201,4 +201,4 @@ install(TARGETS KratosStructuralMechanicsCore DESTINATION libs ) install(TARGETS KratosStructuralMechanicsApplication DESTINATION libs ) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/StructuralMechanicsApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/StructuralMechanicsApplication.py" DESTINATION "KratosMultiphysics/StructuralMechanicsApplication" RENAME "__init__.py") diff --git a/applications/StructuralMechanicsApplication/python_scripts/__init__.py b/applications/StructuralMechanicsApplication/__init__.py similarity index 100% rename from applications/StructuralMechanicsApplication/python_scripts/__init__.py rename to applications/StructuralMechanicsApplication/__init__.py From f058534ac3a55806b55b5d304a9f31f2d9eabb54 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:31:02 +0100 Subject: [PATCH 12/14] Updating Trilinos --- applications/trilinos_application/CMakeLists.txt | 2 +- .../{python_scripts/__init__.py => TrilinosApplication.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename applications/trilinos_application/{python_scripts/__init__.py => TrilinosApplication.py} (100%) diff --git a/applications/trilinos_application/CMakeLists.txt b/applications/trilinos_application/CMakeLists.txt index 235c0c84710c..527161ef5332 100644 --- a/applications/trilinos_application/CMakeLists.txt +++ b/applications/trilinos_application/CMakeLists.txt @@ -109,4 +109,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/python_scripts/__init__.py" DESTINATION "KratosMultiphysics/TrilinosApplication") +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/TrilinosApplication.py" DESTINATION "KratosMultiphysics/TrilinosApplication" RENAME "__init__.py") diff --git a/applications/trilinos_application/python_scripts/__init__.py b/applications/trilinos_application/TrilinosApplication.py similarity index 100% rename from applications/trilinos_application/python_scripts/__init__.py rename to applications/trilinos_application/TrilinosApplication.py From 5787d94eadeee01498ffa06be6732b44f82b03e4 Mon Sep 17 00:00:00 2001 From: philbucher Date: Wed, 12 Dec 2018 19:33:08 +0100 Subject: [PATCH 13/14] updating metisApp --- applications/metis_application/CMakeLists.txt | 2 +- applications/metis_application/MetisApplication.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/metis_application/CMakeLists.txt b/applications/metis_application/CMakeLists.txt index fce8ce318115..68f02367c733 100644 --- a/applications/metis_application/CMakeLists.txt +++ b/applications/metis_application/CMakeLists.txt @@ -55,4 +55,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/MetisApplication.py" DESTINATION KratosMultiphysics ) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/MetisApplication.py" DESTINATION "KratosMultiphysics/MetisApplication" RENAME "__init__.py") diff --git a/applications/metis_application/MetisApplication.py b/applications/metis_application/MetisApplication.py index 3f713d83f9f6..d3576cd84721 100644 --- a/applications/metis_application/MetisApplication.py +++ b/applications/metis_application/MetisApplication.py @@ -5,7 +5,7 @@ application_folder = "metis_application" # The following lines are common for all applications -from . import application_importer +from .. import application_importer import inspect caller = inspect.stack()[1] # Information about the file that imported this, to check for unexpected imports -application_importer.ImportApplication(application, application_name, application_folder, caller) +application_importer.ImportApplication(application, application_name, application_folder, caller, __path__) From db759f3ba729edc3f3ae73ebfcd123c5e8e886dc Mon Sep 17 00:00:00 2001 From: philbucher Date: Thu, 13 Dec 2018 10:31:10 +0100 Subject: [PATCH 14/14] missing fixes --- .../{__init__.py => ContactStructuralMechanicsApplication.py} | 0 applications/IgaApplication/CMakeLists.txt | 2 +- applications/IgaApplication/IgaApplication.py | 4 ++-- .../{__init__.py => StructuralMechanicsApplication.py} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename applications/ContactStructuralMechanicsApplication/{__init__.py => ContactStructuralMechanicsApplication.py} (100%) rename applications/StructuralMechanicsApplication/{__init__.py => StructuralMechanicsApplication.py} (100%) diff --git a/applications/ContactStructuralMechanicsApplication/__init__.py b/applications/ContactStructuralMechanicsApplication/ContactStructuralMechanicsApplication.py similarity index 100% rename from applications/ContactStructuralMechanicsApplication/__init__.py rename to applications/ContactStructuralMechanicsApplication/ContactStructuralMechanicsApplication.py diff --git a/applications/IgaApplication/CMakeLists.txt b/applications/IgaApplication/CMakeLists.txt index 85a53c3fa0a4..1798ee88f259 100644 --- a/applications/IgaApplication/CMakeLists.txt +++ b/applications/IgaApplication/CMakeLists.txt @@ -69,4 +69,4 @@ if(${INSTALL_PYTHON_FILES} MATCHES ON) endif(${INSTALL_PYTHON_FILES} MATCHES ON) # Add to the KratosMultiphisics Python module -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/IgaApplication.py" DESTINATION KratosMultiphysics) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/IgaApplication.py" DESTINATION "KratosMultiphysics/IgaApplication" RENAME "__init__.py") diff --git a/applications/IgaApplication/IgaApplication.py b/applications/IgaApplication/IgaApplication.py index d7c2eef2a84d..6df069aedf17 100644 --- a/applications/IgaApplication/IgaApplication.py +++ b/applications/IgaApplication/IgaApplication.py @@ -18,9 +18,9 @@ application_folder = "IgaApplication" # The following lines are common for all applications -from . import application_importer +from .. import application_importer import inspect # Information about the file that imported this, to check for unexpected imports caller = inspect.stack()[1] application_importer.ImportApplication(application, application_name, - application_folder, caller) + application_folder, caller, __path__) diff --git a/applications/StructuralMechanicsApplication/__init__.py b/applications/StructuralMechanicsApplication/StructuralMechanicsApplication.py similarity index 100% rename from applications/StructuralMechanicsApplication/__init__.py rename to applications/StructuralMechanicsApplication/StructuralMechanicsApplication.py