Fix python warning when running python -m netgen.config, remove unused config_cli.py

This commit is contained in:
Matthias Hochsteger 2024-03-20 11:40:21 +01:00
parent fb6a34f7c9
commit 09769c3283
5 changed files with 14 additions and 12 deletions

View File

@ -4,13 +4,20 @@ if(have_options)
get_target_property(ngcore_compile_options ngcore INTERFACE_COMPILE_OPTIONS)
endif(have_options)
configure_file(config_template.py ${CMAKE_CURRENT_BINARY_DIR}/config.py @ONLY)
configure_file(config/config_template.py ${CMAKE_CURRENT_BINARY_DIR}/config.py @ONLY)
configure_file(version_template.py ${CMAKE_CURRENT_BINARY_DIR}/version.py @ONLY)
install(FILES
config/__init__.py
config/__main__.py
${CMAKE_CURRENT_BINARY_DIR}/config.py
DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX}/config/
COMPONENT netgen
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/version.py
__main__.py __init__.py config_cli.py
__main__.py __init__.py
meshing.py csg.py geom2d.py stl.py gui.py NgOCC.py occ.py
read_gmsh.py read_meshio.py
webgui.py

View File

@ -0,0 +1 @@
from .config import *

View File

@ -0,0 +1,4 @@
from .config import get_cmake_dir
if __name__ == '__main__':
print(get_cmake_dir())

View File

@ -1,10 +0,0 @@
import netgen.config
if __name__=="__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--cmake-dir", help="print path to CMake config files", action='store_true')
args = parser.parse_args()
if(args.cmake_dir):
print(netgen.config.get_cmake_dir())