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 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/ContactStructuralMechanicsApplication.py similarity index 100% rename from applications/ContactStructuralMechanicsApplication/python_scripts/__init__.py rename to applications/ContactStructuralMechanicsApplication/ContactStructuralMechanicsApplication.py 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 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 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__) 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 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 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/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: 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/python_scripts/__init__.py b/applications/MeshMovingApplication/MeshMovingApplication.py similarity index 100% rename from applications/MeshMovingApplication/python_scripts/__init__.py rename to applications/MeshMovingApplication/MeshMovingApplication.py 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 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/StructuralMechanicsApplication.py similarity index 100% rename from applications/StructuralMechanicsApplication/python_scripts/__init__.py rename to applications/StructuralMechanicsApplication/StructuralMechanicsApplication.py 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__) 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