netgen/python/__init__.py
Monty Montgomery 97d3c1ce9e Adjust python module path in __init__, add checks to pytest
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.
2022-05-15 01:16:58 -04:00

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)