mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
Fix python warning when running python -m netgen.config, remove unused config_cli.py
This commit is contained in:
parent
fb6a34f7c9
commit
09769c3283
@ -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
|
||||
|
1
python/config/__init__.py
Normal file
1
python/config/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .config import *
|
4
python/config/__main__.py
Normal file
4
python/config/__main__.py
Normal file
@ -0,0 +1,4 @@
|
||||
from .config import get_cmake_dir
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(get_cmake_dir())
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user