diff options
author | Erich Eckner <git@eckner.net> | 2019-05-10 12:05:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-10 12:05:12 +0200 |
commit | 55729d8fc798a855e5d8e622694778933d46cdf2 (patch) | |
tree | 92e1848e065b37ea37c244f49b7088d4bb028aaf /python-pyepics/PKGBUILD | |
parent | 77466fc34ca253f25f5f2ec25db0e02edde8a28f (diff) | |
download | archlinuxewe-55729d8fc798a855e5d8e622694778933d46cdf2.tar.xz |
python2-pyepics -> python-pyepics
Diffstat (limited to 'python-pyepics/PKGBUILD')
-rwxr-xr-x | python-pyepics/PKGBUILD | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/python-pyepics/PKGBUILD b/python-pyepics/PKGBUILD new file mode 100755 index 000000000..fa425cc80 --- /dev/null +++ b/python-pyepics/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +pkgbase=python-pyepics +pkgname=(python2-pyepics python-pyepics) +pkgver=3.3.3 +pkgrel=2 +pkgdesc='Python Interface to the Epics Channel Access protocol of the Epics control system' +arch=('i686' 'pentium4' 'x86_64') +url='https://pypi.python.org/pypi/pyepics' +license=('Epics Open License') +groups=() +_deppy2=( + 'python2>=2.7' + 'python2<2.8' +) +_deppy=( + 'python>=3.7' + 'python<3.8' +) +_makedepends=( + 'python-setuptools' +) +makedepends=( + "${_deppy[@]}" + "${_deppy2[@]}" + "${_makedepends[@]}" + "${_makedepends[@]/ython/ython2}" +) +source=( + "${pkgname}-${pkgver}.tar.gz::https://pypi.python.org/packages/e6/9a/68dbcdd21c857c396384343dddb7a2939cd7b61f3e851dda287e458e2e42/${pkgname#*-}-${pkgver}.tar.gz" +) +sha512sums=('522b59f678b2491ab4ddfa3863feac170c027a5abc545b93a82f73e4006f5b79544656e1f0fcb7bd080288cc271837b9cdd719c0104672bb70024d497a3f9c33') + +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_python-pyepics() { + depends=( + "${_deppy[@]}" + ) + cd ${pkgname#*-}-${pkgver} + python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr +} + +package_python2-pyepics() { + depends=( + "${_deppy2[@]}" + ) + 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#' {} + +} |