summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Gizdov2018-06-29 17:42:49 +0200
committerKonstantin Gizdov2018-06-29 17:42:49 +0200
commit1334d73c56662584eab8d55145a3edf003b80f0d (patch)
tree43b4f9eb55767e58498bd0116355eb6878aeea0d
downloadaur-1334d73c56662584eab8d55145a3edf003b80f0d.tar.gz
initial release
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD82
2 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..1ba2a1106ae
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = python-uproot
+ pkgdesc = Minimalist CERN ROOT I/O in pure Python and Numpy
+ pkgver = 2.9.0
+ pkgrel = 1
+ url = https://github.com/scikit-hep/uproot
+ arch = any
+ license = BSD
+ options = !emptydirs
+ source = https://github.com/scikit-hep/uproot/archive/2.9.0.zip
+ sha256sums = 352d21d99e5f469086bbb5a1d516a9ebba5b322abdd5235be42c6d80d650beae
+
+pkgname = python2-uproot
+ depends = python2-numpy
+ optdepends = futures: Python2 parallel processing
+ optdepends = lz4: compression used by some ROOT files
+ optdepends = xrootd: access remote files over XRootD
+ optdepends = xz: compression used by some ROOT files
+
+pkgname = python-uproot
+ depends = python-numpy
+ optdepends = lz4: compression used by some ROOT files
+ optdepends = xrootd: access remote files over XRootD
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3db9756cd04
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+
+pkgbase=python-uproot
+_pkgbase=uproot
+pkgname=('python2-uproot' 'python-uproot')
+pkgver=2.9.0
+pkgrel=1
+pkgdesc="Minimalist CERN ROOT I/O in pure Python and Numpy"
+arch=('any')
+url="https://github.com/scikit-hep/uproot"
+license=('BSD')
+# makedepends=('python2-setuptools' 'python-setuptools')
+options=(!emptydirs)
+
+source=("https://github.com/scikit-hep/${_pkgbase}/archive/${pkgver}.zip")
+sha256sums=('352d21d99e5f469086bbb5a1d516a9ebba5b322abdd5235be42c6d80d650beae')
+
+prepare() {
+ cd "${srcdir}"
+ cp -a "uproot-${pkgver}" "uproot-py2-${pkgver}"
+ cd "uproot-py2-${pkgver}"
+
+ msg2 "Adjusting Python 2 shebangs..."
+ find . -name '*.py' -type f -exec \
+ sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+ -i '{}' \; -print
+}
+
+build_python2-uproot() {
+ makedepends=('python2-setuptools' 'python2-numpy')
+
+ msg2 "Building Python2"
+ cd "${srcdir}/uproot-py2-${pkgver}"
+ python2 setup.py build
+}
+
+build_python-uproot() {
+ makedepends=('python-setuptools' 'python-numpy')
+
+ msg2 "Building Python3"
+ cd "${srcdir}/uproot-${pkgver}"
+ python setup.py build
+}
+
+package_python2-uproot() {
+ depends=('python2-numpy')
+ optdepends=('futures: Python2 parallel processing'
+ 'lz4: compression used by some ROOT files'
+ 'xrootd: access remote files over XRootD'
+ 'xz: compression used by some ROOT files')
+ cd "${srcdir}/uproot-py2-${pkgver}"
+
+ python2 setup.py install --root="${pkgdir}/" --optimize=1
+
+ install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -D README.rst "${pkgdir}/usr/share/${pkgname}/README.rst"
+ rm "${pkgdir}/usr/README.rst"
+
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/"
+}
+
+package_python-uproot() {
+ depends=('python-numpy')
+ optdepends=('lz4: compression used by some ROOT files'
+ 'xrootd: access remote files over XRootD')
+ cd "${srcdir}/uproot-${pkgver}"
+
+ python setup.py install --root="${pkgdir}/" --optimize=1
+
+ install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -D README.rst "${pkgdir}/usr/share/${pkgname}/README.rst"
+ rm "${pkgdir}/usr/README.rst"
+
+ # See FS#49651
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/"
+}