Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apps/improve py init #3642

Merged
merged 14 commits into from
Dec 13, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion applications/EigenSolversApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion applications/EmpireApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion applications/ExternalSolversApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
2 changes: 1 addition & 1 deletion applications/FluidDynamicsApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion applications/HDF5Application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion applications/IgaApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 2 additions & 2 deletions applications/IgaApplication/IgaApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
2 changes: 1 addition & 1 deletion applications/MappingApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 2 additions & 2 deletions applications/MappingApplication/MappingApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion applications/MeshMovingApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion applications/ShapeOptimizationApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion applications/metis_application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 2 additions & 2 deletions applications/metis_application/MetisApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
2 changes: 1 addition & 1 deletion applications/trilinos_application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")