summaryrefslogtreecommitdiff
path: root/python-pymca
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-09 10:01:46 +0200
committerErich Eckner <git@eckner.net>2019-07-09 10:01:46 +0200
commitd9c6207c33d6b054f8b1d13e71e15af9f9cc1501 (patch)
tree36a61dc94f44f4f4f73e6f7fd4bb8eb9839ff4e4 /python-pymca
parente20630e99719291cb103c55b1db0e29df5ce94c4 (diff)
downloadarchlinuxewe-d9c6207c33d6b054f8b1d13e71e15af9f9cc1501.tar.xz
python-pymca new
Diffstat (limited to 'python-pymca')
-rwxr-xr-xpython-pymca/PKGBUILD82
1 files changed, 82 insertions, 0 deletions
diff --git a/python-pymca/PKGBUILD b/python-pymca/PKGBUILD
new file mode 100755
index 000000000..22a1bc481
--- /dev/null
+++ b/python-pymca/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+pkgbase=python-pymca
+pkgname=(python2-pymca python-pymca)
+_pkgname="${pkgbase#*-}"
+pkgver=5.4.3
+pkgrel=1
+pkgdesc='Stand-alone application and Python tools for interactive and/or batch processing analysis of X-Ray Fluorescence Spectra'
+arch=('i686' 'pentium4' 'x86_64')
+url='http://pymca.sourceforge.net/index.html'
+license=('MIT License')
+_deppy2=(
+ 'python2>=2.7'
+ 'python2<2.8'
+)
+_deppy=(
+ 'python>=3.7'
+ 'python<3.8'
+)
+_depends=(
+ 'python-numpy'
+ 'python-fisx'
+ 'python-h5py')
+_makedepends=(
+ 'python-setuptools'
+ 'python-pyqt5')
+_optdepends=(
+ 'python-pyqt5: gui'
+ 'python-matplotlib: gui')
+makedepends=(
+ "${_deppy[@]}"
+ "${_deppy2[@]}"
+ "${_depends[@]}"
+ "${_depends[@]/python/python2}"
+ "${_makedepends[@]}"
+ "${_makedepends[@]/ython/ython2}"
+)
+source=(
+ "${_pkgname}-v${pkgver}.tar.gz::https://github.com/vasole/${_pkgname}/archive/v${pkgver}.tar.gz"
+)
+sha512sums=('c93709bb6bcf7ae5f58604a08357eb9e252da4d2506e2a79e4c5bbc2031b6e7ff29ede258d0819ac69fd0377182da38d6cf23bd8e7721cfdb46a377c92eaf6c0')
+
+prepare() {
+ cp -a ${_pkgname}-${pkgver}{,-py2}
+}
+
+build() {
+ echo "Building python..."
+ (
+ cd ${_pkgname}-${pkgver}
+ python setup.py build
+ )
+ echo "Building python2..."
+ (
+ cd ${_pkgname}-${pkgver}-py2
+ python2 setup.py build
+ )
+}
+
+package_python2-pymca() {
+ depends=(
+ "${_deppy2[@]}"
+ "${_depends[@]/python/python2}"
+ )
+ optdepends=(
+ "${_optdepends[@]/python/python2}"
+ )
+ cd ${_pkgname}-${pkgver}-py2
+ python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
+ find "${pkgdir}" -type f -exec sed -si '1 s#[/ ]python\s*$# python2#' {} +
+}
+
+package_python-pymca() {
+ depends=(
+ "${_deppy[@]}"
+ "${_depends[@]}"
+ )
+ optdepends=(
+ "${_optdepends[@]}"
+ )
+ cd ${_pkgname}-${pkgver}
+ python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
+}