From 643ecc2e5e02e3cccc6518dfd5d7619d3856b1ce Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 1 Feb 2017 11:06:43 +0100 Subject: [PATCH] avoid dependency on env variable NETGENDIR in Python package --- python/__init__.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/python/__init__.py b/python/__init__.py index b854a7b1..f4c851d7 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1,23 +1,14 @@ -from os import environ +import os from sys import path from sys import platform as __platform + if __platform.startswith('linux'): - path.append(environ['NETGENDIR']+'/../lib') + path.append(os.path.dirname(__file__) + '/../../..') if __platform.startswith('win'): - path.append(environ['NETGENDIR']) + path.append(os.path.dirname(__file__) + '/../../../bin') if __platform.startswith('darwin'): - path.append(environ['NETGENDIR']) + path.append(os.path.dirname(__file__) + '/../../../../../MacOS') - -# from libngpy import * import libngpy -# from libngpy import * - -# import libngpy - -# from . import csg -# from . import meshing -# from . import geom2d - del environ del path