summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog13
-rw-r--r--debian/control6
-rw-r--r--debian/gitlab-ci.yml9
-rw-r--r--debian/patches/0007-Fix-some-imports-to-make-python-interface-work.patch55
-rw-r--r--openEMS/python/openEMS/__init__.py5
-rw-r--r--openEMS/python/openEMS/nf2ff.py5
-rw-r--r--openEMS/python/openEMS/ports.py5
7 files changed, 59 insertions, 39 deletions
diff --git a/debian/changelog b/debian/changelog
index b6ecb26..b7f9f9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+openems (0.0.35+git20190103.6a75e98+dfsg.1-1~exp2) experimental; urgency=medium
+
+ * d/patches/0007-Fix-some-imports-to-make-python-interface-work.patch:
+ - Use 'from __future__ import absolute_import' instead to fix import in
+ Python2 package
+ * debian/control:
+ - Add missing install dependencies python3-matplotlib and
+ python-matplotlib.
+ * debian/gitlab-ci.yml:
+ - Enable continuous integration on salsa
+
+ -- Ruben Undheim <ruben.undheim@gmail.com> Thu, 21 Feb 2019 23:19:00 +0100
+
openems (0.0.35+git20190103.6a75e98+dfsg.1-1~exp1) experimental; urgency=low
* New upstream GIT HEAD with Python interface support
diff --git a/debian/control b/debian/control
index 3222548..67115a0 100644
--- a/debian/control
+++ b/debian/control
@@ -142,7 +142,8 @@ Depends: ${shlibs:Depends},
${python:Depends},
openems,
python,
- python-h5py
+ python-h5py,
+ python-matplotlib
Description: Python interface for openems
This package contains the Python-files needed for
openEMS.
@@ -158,7 +159,8 @@ Depends: ${shlibs:Depends},
${python3:Depends},
openems,
python3,
- python3-h5py
+ python3-h5py,
+ python3-matplotlib
Description: Python3 interface for openems
This package contains the Python-files needed for
openEMS (Python 3).
diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml
new file mode 100644
index 0000000..d9acd28
--- /dev/null
+++ b/debian/gitlab-ci.yml
@@ -0,0 +1,9 @@
+image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
+
+build:
+ artifacts:
+ paths:
+ - "*.deb"
+ expire_in: 1 day
+ script:
+ - gitlab-ci-git-buildpackage-all
diff --git a/debian/patches/0007-Fix-some-imports-to-make-python-interface-work.patch b/debian/patches/0007-Fix-some-imports-to-make-python-interface-work.patch
index f6bcd8f..a3fadc0 100644
--- a/debian/patches/0007-Fix-some-imports-to-make-python-interface-work.patch
+++ b/debian/patches/0007-Fix-some-imports-to-make-python-interface-work.patch
@@ -3,54 +3,47 @@ Date: Sun, 10 Feb 2019 12:55:06 +0000
Subject: Fix some imports to make python interface work
---
- openEMS/python/openEMS/__init__.py | 3 ++-
- openEMS/python/openEMS/nf2ff.py | 4 ++--
- openEMS/python/openEMS/ports.py | 6 +++---
- 3 files changed, 7 insertions(+), 6 deletions(-)
+ openEMS/python/openEMS/__init__.py | 2 ++
+ openEMS/python/openEMS/nf2ff.py | 1 +
+ openEMS/python/openEMS/ports.py | 3 ++-
+ 3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/openEMS/python/openEMS/__init__.py b/openEMS/python/openEMS/__init__.py
-index fb1ddb9..b54ab97 100644
+index fb1ddb9..734aa76 100644
--- a/openEMS/python/openEMS/__init__.py
+++ b/openEMS/python/openEMS/__init__.py
-@@ -1,4 +1,5 @@
+@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
#
# Shortcut openEMS import
--from openEMS.openEMS import openEMS
-+#from openEMS.openEMS import openEMS
-+from openEMS import openEMS
++from __future__ import absolute_import
++
+ from openEMS.openEMS import openEMS
diff --git a/openEMS/python/openEMS/nf2ff.py b/openEMS/python/openEMS/nf2ff.py
-index b6d38d0..5b3ffc1 100644
+index b6d38d0..b3792ff 100644
--- a/openEMS/python/openEMS/nf2ff.py
+++ b/openEMS/python/openEMS/nf2ff.py
-@@ -19,8 +19,8 @@
+@@ -15,6 +15,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #
++from __future__ import absolute_import
+
import os
import numpy as np
- import h5py
--from openEMS import _nf2ff
--from openEMS import utilities
-+import _nf2ff
-+import utilities
-
- class nf2ff:
- """
diff --git a/openEMS/python/openEMS/ports.py b/openEMS/python/openEMS/ports.py
-index 1af1564..1e42a8f 100644
+index 1af1564..5b4fdc0 100644
--- a/openEMS/python/openEMS/ports.py
+++ b/openEMS/python/openEMS/ports.py
-@@ -19,9 +19,9 @@
+@@ -15,6 +15,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #
++from __future__ import absolute_import
+
import os
import numpy as np
- from CSXCAD.Utilities import CheckNyDir
--from openEMS import utilities
-+import utilities
-
--from openEMS.physical_constants import *
-+from physical_constants import *
-
- class UI_data:
- def __init__(self, fns, path, freq, signal_type='pulse', **kw):
-@@ -45,7 +45,7 @@ class UI_data:
+@@ -45,7 +46,7 @@ class UI_data:
self.ui_f_val.append(utilities.DFT_time2freq(tmp[:,0], tmp[:,1], freq, signal_type=signal_type))
# Port Base-Class
diff --git a/openEMS/python/openEMS/__init__.py b/openEMS/python/openEMS/__init__.py
index b54ab97..734aa76 100644
--- a/openEMS/python/openEMS/__init__.py
+++ b/openEMS/python/openEMS/__init__.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
#
# Shortcut openEMS import
-#from openEMS.openEMS import openEMS
-from openEMS import openEMS
+from __future__ import absolute_import
+
+from openEMS.openEMS import openEMS
diff --git a/openEMS/python/openEMS/nf2ff.py b/openEMS/python/openEMS/nf2ff.py
index 5b3ffc1..b3792ff 100644
--- a/openEMS/python/openEMS/nf2ff.py
+++ b/openEMS/python/openEMS/nf2ff.py
@@ -15,12 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import
import os
import numpy as np
import h5py
-import _nf2ff
-import utilities
+from openEMS import _nf2ff
+from openEMS import utilities
class nf2ff:
"""
diff --git a/openEMS/python/openEMS/ports.py b/openEMS/python/openEMS/ports.py
index 1e42a8f..5b4fdc0 100644
--- a/openEMS/python/openEMS/ports.py
+++ b/openEMS/python/openEMS/ports.py
@@ -15,13 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import
import os
import numpy as np
from CSXCAD.Utilities import CheckNyDir
-import utilities
+from openEMS import utilities
-from physical_constants import *
+from openEMS.physical_constants import *
class UI_data:
def __init__(self, fns, path, freq, signal_type='pulse', **kw):