summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-24 11:15:24 +0100
committerErich Eckner <git@eckner.net>2019-01-24 11:17:19 +0100
commitd05bc02eff1f747df64caa37ccc101dd39b2f252 (patch)
tree1fdb3d3b8d16698d71660f9d336fd0ee115c0d95
downloadpython-postpic-d05bc02eff1f747df64caa37ccc101dd39b2f252.tar.xz
initial commit
-rw-r--r--.SRCINFO57
-rw-r--r--PKGBUILD94
2 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..6aa1f73
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,57 @@
+pkgbase = python-postpic
+ pkgdesc = The open source particle-in-cell post processor.
+ pkgver = 0.4
+ pkgrel = 1
+ url = https://github.com/skuschel/postpic
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = python>=3.7
+ makedepends = python<3.8
+ makedepends = python2>=2.7
+ makedepends = python2<2.8
+ makedepends = python-matplotlib
+ makedepends = python-numpy>=1.7
+ makedepends = python-scipy
+ makedepends = python-future
+ makedepends = python-urllib3
+ makedepends = python-numexpr
+ makedepends = python2-matplotlib
+ makedepends = python2-numpy>=1.7
+ makedepends = python2-scipy
+ makedepends = python2-future
+ makedepends = python2-urllib3
+ makedepends = python2-numexpr
+ makedepends = python-setuptools
+ makedepends = cython
+ makedepends = python-h5py
+ makedepends = python2-setuptools
+ makedepends = cython2
+ makedepends = python2-h5py
+ source = python-postpic-0.4.tar.gz::https://github.com/skuschel/postpic/archive/v0.4.tar.gz
+ sha512sums = 4f3d9ed4ae70f0fb8ae4e2e690aa9dc683cb92c78b1daef2dd251ada9653b94d7b5bf688dae64e998f808ff812650c32d8a5570224a1d72d6b0123a803bb21ac
+
+pkgname = python-postpic
+ depends = python>=3.7
+ depends = python<3.8
+ depends = python-matplotlib
+ depends = python-numpy>=1.7
+ depends = python-scipy
+ depends = python-future
+ depends = python-urllib3
+ depends = python-numexpr
+ optdepends = python-h5py: h5 reader for openPMD support
+ optdepends = python-sdf: sdf support for EPOCH reader
+
+pkgname = python2-postpic
+ depends = python2>=2.7
+ depends = python2<2.8
+ depends = python2-matplotlib
+ depends = python2-numpy>=1.7
+ depends = python2-scipy
+ depends = python2-future
+ depends = python2-urllib3
+ depends = python2-numexpr
+ optdepends = python2-h5py: h5 reader for openPMD support
+ optdepends = python2-sdf: sdf support for EPOCH reader
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..bd1ed2f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,94 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+
+pkgbase=python-postpic
+pkgname=(python-postpic python2-postpic)
+pkgver=0.4
+pkgrel=1
+pkgdesc='The open source particle-in-cell post processor.'
+url='https://github.com/skuschel/postpic'
+arch=('i686' 'x86_64')
+license=('GPL3')
+_deppy2=(
+ 'python2>=2.7'
+ 'python2<2.8'
+)
+_deppy=(
+ 'python>=3.7'
+ 'python<3.8'
+)
+_depends=(
+ 'python-matplotlib' 'python-numpy>=1.7' 'python-scipy' 'python-future' 'python-urllib3' 'python-numexpr'
+)
+_makedepends=(
+ 'python-setuptools'
+ 'cython'
+ 'python-h5py'
+)
+_optdepends=(
+ 'python-h5py: h5 reader for openPMD support'
+ 'python-sdf: sdf support for EPOCH reader'
+)
+makedepends=(
+ "${_deppy[@]}"
+ "${_deppy2[@]}"
+ "${_depends[@]}"
+ "${_depends[@]/python/python2}"
+ "${_makedepends[@]}"
+ "${_makedepends[@]/ython/ython2}"
+)
+source=($pkgname-$pkgver.tar.gz::https://github.com/skuschel/postpic/archive/v$pkgver.tar.gz)
+sha512sums=('4f3d9ed4ae70f0fb8ae4e2e690aa9dc683cb92c78b1daef2dd251ada9653b94d7b5bf688dae64e998f808ff812650c32d8a5570224a1d72d6b0123a803bb21ac')
+
+prepare() {
+ cp -a postpic-${pkgver}{,-py2}
+}
+
+build() {
+ echo "Building python..."
+ (cd postpic-${pkgver}
+ python setup.py build
+ )
+ echo "Building python2..."
+ (cd postpic-${pkgver}-py2
+ python2 setup.py build
+ )
+}
+
+check() {
+ echo "Checking python..."
+ (cd postpic-${pkgver}
+ python setup.py test
+ )
+ echo "Checking python2..."
+ (cd postpic-${pkgver}-py2
+ python2 setup.py test
+ )
+}
+
+package_python-postpic() {
+ depends=(
+ "${_deppy[@]}"
+ "${_depends[@]}"
+ )
+ optdepends=("${_optdepends[@]}")
+
+ cd postpic-${pkgver}
+ python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build
+ install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
+ #install -Dm 644 CHANGES README -t "${pkgdir}"/usr/share/doc/${pkgname}
+}
+
+package_python2-postpic() {
+ depends=(
+ "${_deppy2[@]}"
+ "${_depends[@]/python/python2}"
+ )
+ optdepends=("${_optdepends[@]/python/python2}")
+
+ cd postpic-${pkgver}-py2
+ python2 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build
+ install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
+ #install -Dm 644 CHANGES README -t "${pkgdir}"/usr/share/doc/${pkgname}
+}
+
+# vim: ts=2 sw=2 et: