summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2019-02-10 20:25:10 +0000
committerRuben Undheim <ruben.undheim@gmail.com>2019-02-10 20:42:34 +0000
commit17ce4364871ebfd7bacfddcf2c5b7da8d2c81d12 (patch)
treedfa3002ee9ee7c62fc2ea8c6ea6553a42913dfa9
parentf392fe3c066d2e0108701c437bdd5cde2af75b51 (diff)
Build for python3 also
-rw-r--r--debian/control18
-rw-r--r--debian/python-openems.install4
-rw-r--r--debian/python3-openems.install2
-rwxr-xr-xdebian/rules7
4 files changed, 28 insertions, 3 deletions
diff --git a/debian/control b/debian/control
index 34690b9..5d8cebc 100644
--- a/debian/control
+++ b/debian/control
@@ -16,9 +16,11 @@ Build-Depends: debhelper (>= 11),
# and dh-octave in sid
dh-octave | octave-pkg-dev,
cython,
+ cython3,
chrpath,
dh-python,
python-all,
+ python3-all,
txt2man
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/science-team/openems
@@ -147,3 +149,19 @@ Description: Python interface for openems
.
openEMS is a simulator for electromagnetic problems using
the FDTD algorithm.
+
+Package: python3-openems
+Architecture: any
+Section: python
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ ${python3:Depends},
+ openems,
+ python3,
+ python3-h5py
+Description: Python3 interface for openems
+ This package contains the Python-files needed for
+ openEMS (Python 3).
+ .
+ openEMS is a simulator for electromagnetic problems using
+ the FDTD algorithm.
diff --git a/debian/python-openems.install b/debian/python-openems.install
index 584b067..4e2369e 100644
--- a/debian/python-openems.install
+++ b/debian/python-openems.install
@@ -1,2 +1,2 @@
-openEMS/python/debian/tmp/usr/lib usr/
-CSXCAD/python/debian/tmp/usr/lib usr/
+openEMS/python/debian/tmp/usr/lib/python2* usr/lib/
+CSXCAD/python/debian/tmp/usr/lib/python2* usr/lib/
diff --git a/debian/python3-openems.install b/debian/python3-openems.install
new file mode 100644
index 0000000..c305eb3
--- /dev/null
+++ b/debian/python3-openems.install
@@ -0,0 +1,2 @@
+openEMS/python/debian/tmp/usr/lib/python3* usr/lib/
+CSXCAD/python/debian/tmp/usr/lib/python3* usr/lib/
diff --git a/debian/rules b/debian/rules
index 614a807..f84f290 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,11 +19,12 @@ OCTAVE_API_VERSION = $(shell octave-config -p API_VERSION)
OCTAVE_FULLBPATH = $(OCTAVE_BPATH)/openems-0.0.35/$(OCTAVE_HOSTTYPE)-$(OCTAVE_API_VERSION)
PYTHON2VERSIONS := $(shell pyversions -s -v)
+PYTHON3VERSIONS := $(shell py3versions -s -v)
export CXXFLAGS := $(CXXFLAGS) -DSSE_CORRECT_DENORMALS=0
%:
- dh $@ --with python2
+ dh $@ --with python2,python3
# Since some sub-folders depend on other sub-folders to be installed before
@@ -52,7 +53,9 @@ override_dh_auto_install:
chrpath -d debian/tmp/usr/bin/nf2ff
chrpath -d debian/tmp/usr/bin/openEMS
cd CSXCAD/python && CPPFLAGS=-I../../debian/tmp/usr/include LDFLAGS=-L../../debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) PYBUILD_VERSIONS="$(PYTHON2VERSIONS)" pybuild --build && PYBUILD_VERSIONS="$(PYTHON2VERSIONS)" pybuild --install
+ cd CSXCAD/python && CPPFLAGS=-I../../debian/tmp/usr/include LDFLAGS=-L../../debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) PYBUILD_VERSIONS="$(PYTHON3VERSIONS)" pybuild --build && PYBUILD_VERSIONS="$(PYTHON3VERSIONS)" pybuild --install
cd openEMS/python && CPPFLAGS=-I../../debian/tmp/usr/include LDFLAGS=-L../../debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) PYBUILD_VERSIONS="$(PYTHON2VERSIONS)" pybuild --build && PYBUILD_VERSIONS="$(PYTHON2VERSIONS)" pybuild --install
+ cd openEMS/python && CPPFLAGS=-I../../debian/tmp/usr/include LDFLAGS=-L../../debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) PYBUILD_VERSIONS="$(PYTHON3VERSIONS)" pybuild --build && PYBUILD_VERSIONS="$(PYTHON3VERSIONS)" pybuild --install
override_dh_auto_clean:
dh_auto_clean
@@ -63,6 +66,8 @@ override_dh_auto_clean:
$(RM) debian/man/*.1
cd CSXCAD/python && PYBUILD_VERSIONS="$(PYTHON2VERSIONS)" pybuild --clean
cd openEMS/python && PYBUILD_VERSIONS="$(PYTHON2VERSIONS)" pybuild --clean
+ cd CSXCAD/python && PYBUILD_VERSIONS="$(PYTHON3VERSIONS)" pybuild --clean
+ cd openEMS/python && PYBUILD_VERSIONS="$(PYTHON3VERSIONS)" pybuild --clean
$(RM) -r CSXCAD/python/debian
$(RM) -r openEMS/python/debian
$(RM) CSXCAD/python/CSXCAD/*.cpp