mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-15 15:30:34 +05:00
97d3c1ce9e
Adjust path setup of the python modules in __init__ such that it's possible to run pytests from a mock root during package build/test. Also add checks to pytest/CMakelists.txt to make sure pytest abd check are present instead of failing with an inscrutible traceback if they're not installed or usable.
23 lines
576 B
Python
23 lines
576 B
Python
import os
|
|
import sys
|
|
|
|
from . import config
|
|
_netgen_bin_dir=os.path.realpath(os.path.join(config.NG_INSTALL_DIR_PYTHON,config.NETGEN_PYTHON_RPATH_BIN))
|
|
_netgen_lib_dir=os.path.realpath(os.path.join(config.NG_INSTALL_DIR_PYTHON,config.NETGEN_PYTHON_RPATH))
|
|
|
|
if sys.platform.startswith('win'):
|
|
if sys.version >= '3.8':
|
|
os.add_dll_directory(_netgen_bin_dir)
|
|
else:
|
|
os.environ['PATH'] += ';'+_netgen_bin_dir
|
|
|
|
del sys
|
|
del os
|
|
|
|
from . import libngpy
|
|
|
|
from netgen.libngpy._meshing import _Redraw
|
|
|
|
def Redraw(*args, **kwargs):
|
|
return _Redraw(*args, **kwargs)
|