summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD39
-rw-r--r--PR11.patch82
3 files changed, 16 insertions, 128 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de54a8ced67..e63582adbaf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,34 +1,19 @@
pkgbase = python-pyfmi
pkgdesc = A package for working with dynamic models compliant with the FMI standard.
- pkgver = 2.5
+ pkgver = 2.5.1
pkgrel = 1
url = http://www.pyfmi.org
arch = i686
arch = x86_64
license = LGPL
makedepends = python-setuptools
- makedepends = python2-setuptools
- makedepends = fmilib
makedepends = cython
- makedepends = cython2
- makedepends = python-assimulo
- makedepends = python2-assimulo
- makedepends = python-lxml
- makedepends = python2-lxml
- source = https://pypi.io/packages/source/P/PyFMI/PyFMI-2.5.tar.gz
- source = PR11.patch
- sha256sums = f0485f786a40448c8ffb9e2b03a587d84cd1fe403c1056f50ab787de18f8ba0b
- sha256sums = SKIP
-
-pkgname = python-pyfmi
depends = fmilib
depends = python-scipy
depends = python-lxml
depends = python-assimulo
+ source = https://github.com/modelon/PyFMI/archive/PyFMI-2.5.1.tar.gz
+ sha256sums = f59d2634b346d66ce0271aa1d689255a9b400b02570b4007020a10f3d6b92797
-pkgname = python2-pyfmi
- depends = fmilib
- depends = python2-scipy
- depends = python2-lxml
- depends = python2-assimulo
+pkgname = python-pyfmi
diff --git a/PKGBUILD b/PKGBUILD
index c229dd7523b..7cc6155d8ee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,29 @@
-pkgbase=python-pyfmi
-pkgname=('python-pyfmi' 'python2-pyfmi')
-pkgver=2.5
+pkgname=python-pyfmi
+pkgver=2.5.1
pkgrel=1
pkgdesc="A package for working with dynamic models compliant with the FMI standard."
url="http://www.pyfmi.org"
arch=('i686' 'x86_64')
license=('LGPL')
-makedepends=('python-setuptools' 'python2-setuptools' 'fmilib' 'cython' 'cython2' 'python-assimulo' 'python2-assimulo' 'python-lxml' 'python2-lxml')
-source=("https://pypi.io/packages/source/P/PyFMI/PyFMI-${pkgver}.tar.gz" PR11.patch)
-sha256sums=('f0485f786a40448c8ffb9e2b03a587d84cd1fe403c1056f50ab787de18f8ba0b' SKIP)
+makedepends=('python-setuptools' 'cython')
+depends=('fmilib' 'python-scipy' 'python-lxml' 'python-assimulo')
+source=("https://github.com/modelon/PyFMI/archive/PyFMI-${pkgver}.tar.gz")
+#source=("https://pypi.io/packages/source/P/PyFMI/PyFMI-${pkgver}.tar.gz")
+sha256sums=('f59d2634b346d66ce0271aa1d689255a9b400b02570b4007020a10f3d6b92797')
prepare() {
- cd "${srcdir}"/PyFMI-${pkgver}
- rm src/pyfmi/*.c
-
- # https://github.com/modelon/PyFMI/issues/10
- patch -p1 -i "${srcdir}"/PR11.patch
+ cd "${srcdir}"/PyFMI-PyFMI-${pkgver}
+ #rm src/pyfmi/*.c
}
build() {
- cp -r "${srcdir}"/PyFMI-${pkgver} "${srcdir}"/PyFMI-${pkgver}-py2
-
- cd "${srcdir}"/PyFMI-${pkgver}
+ cd "${srcdir}"/PyFMI-PyFMI-${pkgver}
python setup.py build --fmil-home=/usr/
-
- cd "${srcdir}"/PyFMI-${pkgver}-py2
- python2 setup.py build --fmil-home=/usr/
}
-package_python-pyfmi() {
- depends=('fmilib' 'python-scipy' 'python-lxml' 'python-assimulo')
-
- cd "${srcdir}"/PyFMI-${pkgver}
+package() {
+ cd "${srcdir}"/PyFMI-PyFMI-${pkgver}
python setup.py install --root=${pkgdir} --fmil-home=/usr/
}
-package_python2-pyfmi() {
- depends=('fmilib' 'python2-scipy' 'python2-lxml' 'python2-assimulo')
-
- cd "${srcdir}"/PyFMI-${pkgver}
- python2 setup.py install --root=${pkgdir} --fmil-home=/usr/
-}
diff --git a/PR11.patch b/PR11.patch
deleted file mode 100644
index 3bd3bf26b08..00000000000
--- a/PR11.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 55bb786945ed5f605328bd27eb4f2cd1e6b60686 Mon Sep 17 00:00:00 2001
-From: Julien Schueller <schueller@phimeca.com>
-Date: Fri, 11 Jan 2019 09:02:05 +0100
-Subject: [PATCH 1/3] Fix encoding issue
-
-Partially addresses #10, it seems there are more of these
----
- src/pyfmi/fmi.pyx | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/pyfmi/fmi.pyx b/src/pyfmi/fmi.pyx
-index d30de5f..8ca80e4 100644
---- a/src/pyfmi/fmi.pyx
-+++ b/src/pyfmi/fmi.pyx
-@@ -1164,7 +1164,7 @@ cdef class FMUModelBase(ModelBase):
-
- fmu_full_path = os.path.abspath(os.path.join(path,fmu))
- if _unzipped_dir:
-- fmu_temp_dir = encode(_unzipped_dir)
-+ fmu_temp_dir = _unzipped_dir
- else:
- fmu_temp_dir = encode(create_temp_dir())
- self._fmu_temp_dir = <char*>FMIL.malloc((FMIL.strlen(fmu_temp_dir)+1)*sizeof(char))
-@@ -3758,7 +3758,7 @@ cdef class FMUModelBase2(ModelBase):
-
- #Get the FMI version of the provided model
- if _unzipped_dir:
-- fmu_temp_dir = encode(_unzipped_dir)
-+ fmu_temp_dir = _unzipped_dir
- else:
- fmu_temp_dir = encode(create_temp_dir())
- self._fmu_temp_dir = <char*>FMIL.malloc((FMIL.strlen(fmu_temp_dir)+1)*sizeof(char))
-
-From 35d0ffd76da42d78c107ba24deff25e0c46b69c7 Mon Sep 17 00:00:00 2001
-From: Julien Schueller <schueller@phimeca.com>
-Date: Fri, 11 Jan 2019 11:53:19 +0100
-Subject: [PATCH 2/3] Fix encoding for convert_str_list
-
----
- src/common/io.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/common/io.py b/src/common/io.py
-index 0a3c176..7490aa1 100644
---- a/src/common/io.py
-+++ b/src/common/io.py
-@@ -2141,8 +2141,8 @@ def simulation_start(self):
- name_data = ["time"] + [var.name for var in sorted_vars]
- desc_data = ["Time in [s]"] + [var.description for var in sorted_vars]
-
-- len_name_data, name_data = fmi_util.convert_str_list(name_data)
-- len_desc_data, desc_data = fmi_util.convert_str_list(desc_data)
-+ len_name_data, name_data = fmi_util.convert_str_list(list(map(str.encode, name_data)))
-+ len_desc_data, desc_data = fmi_util.convert_str_list(list(map(str.encode, desc_data)))
-
- self._write_header("name", len_name_data, len_name_items, "char")
- self.dump_native_data(name_data)
-
-From e72e5f5de6ffa67d0c2ef571b1213071abd0eb6b Mon Sep 17 00:00:00 2001
-From: Julien Schueller <schueller@phimeca.com>
-Date: Fri, 11 Jan 2019 13:20:21 +0100
-Subject: [PATCH 3/3] Try to fix encoding issue in ResultDymolaBinary
-
----
- src/common/io.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/common/io.py b/src/common/io.py
-index 7490aa1..76d24ce 100644
---- a/src/common/io.py
-+++ b/src/common/io.py
-@@ -1111,8 +1111,8 @@ def __init__(self,fname):
- self.raw = scipy.io.loadmat(fname,chars_as_strings=False, variable_names=["name", "dataInfo", "data_1", "data_2"])
- name = self.raw['name']
- #self.name = ["".join(name[:,i]).rstrip() for i in range(name[0,:].size)]
-- #self.name = fmi_util.convert_array_names_list_names(name)
-- self.name = fmi_util.convert_array_names_list_names_int(name.view(np.int32))
-+ self.name = fmi_util.convert_array_names_list_names(name)
-+ #self.name = fmi_util.convert_array_names_list_names_int(name.view(np.int32))
- self.dataInfo = self.raw['dataInfo'].transpose()
-
- #self.name = [