getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] [getfem-commits] branch master updated: Support both in


From: Konstantinos Poulios
Subject: [Getfem-commits] [getfem-commits] branch master updated: Support both installed and non-installed python3 module imports
Date: Fri, 03 Apr 2020 10:59:31 -0400

This is an automated email from the git hooks/post-receive script.

logari81 pushed a commit to branch master
in repository getfem.

The following commit(s) were added to refs/heads/master by this push:
     new fef17a6  Support both installed and non-installed python3 module 
imports
fef17a6 is described below

commit fef17a660a013637f777ab5846386084df65ac09
Author: Konstantinos Poulios <address@hidden>
AuthorDate: Fri Apr 3 16:59:20 2020 +0200

    Support both installed and non-installed python3 module imports
---
 bin/extract_doc                  | 6 +++++-
 interface/src/python/__init__.py | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/extract_doc b/bin/extract_doc
index 3d5788c..78b1f25 100755
--- a/bin/extract_doc
+++ b/bin/extract_doc
@@ -1622,7 +1622,11 @@ except ImportError:
 
 from numpy import *
 
-from _getfem import *
+try:
+  from ._getfem import *
+except ImportError:
+  from _getfem import *
+
 obj_count = {}
 getfem('workspace', 'clear all')
 
diff --git a/interface/src/python/__init__.py b/interface/src/python/__init__.py
index 1971861..d0cb235 100644
--- a/interface/src/python/__init__.py
+++ b/interface/src/python/__init__.py
@@ -13,4 +13,4 @@ __LICENSE__ = """\
 GetFEM++ is free software; you can redistribute it and/or modify it under the 
terms of the GNU Lesser General Public License as published by the Free 
Software Foundation; either version 3 of the License, or (at your option) any 
later version along with the GCC Runtime Library Exception either version 3.1 
or (at your option) any later version. This program is distributed in the hope 
that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
warranty of MERCHANTABILITY or F [...]
 """
 
-from getfem import *
+from .getfem import *



reply via email to

[Prev in Thread] Current Thread [Next in Thread]