summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorclintval2018-01-21 17:22:22 -0800
committerclintval2018-01-21 17:22:22 -0800
commit81985b58bb57f7569f0b62e147bf1200eb1575b3 (patch)
treefe335ef2fc0473f8199199ab069fe7003b345746 /PKGBUILD
parent45ef8f77707066e7f76cf507c96451a2793fe4d4 (diff)
downloadaur-81985b58bb57f7569f0b62e147bf1200eb1575b3.tar.gz
python-pybedtools-git to split package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD88
1 files changed, 68 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 752b318f53e..d6f18dca586 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,84 @@
# Maintainer: Clint Valentine <valentine.clint@gmail.com>
-pkgname='python-pybedtools-git'
-pkgver=0.7.10.r21.g7143a86
+_name=pybedtools
+pkgbase='python-pybedtools-git'
+pkgname=('python-pybedtools-git' 'python2-pybedtools-git')
+pkgver=0.7.10.r25.g9ab3ff6
pkgrel=1
-pkgdesc="Python wrapper for Aaron Quinlan's bedtools."
+pkgdesc="Python wrapper for the bioinformatics genomic arithmetic tool bedtools"
arch=('any')
-url="http://daler.github.io/pybedtools"
+url="https://pypi.python.org/pypi/pybedtools"
license=('GPL2')
-depends=(
- 'python'
- 'python-numpy'
- 'python-pandas'
- 'python-pysam>=0.8.1'
- 'python-six')
-makedepends=('cython' 'python-setuptools')
-optdepends=(
- 'bedtools: more-or-less required by namesake'
- 'htslib: for working with SAM/BAM/CRAM files'
- 'python-matplotlib: for plotting genomic intervals'
- 'ucsc-kent-genome-tools: for bedgraph to bigwig conversions')
provides=('python-pybedtools')
conflicts=('python-pybedtools')
+makedepends=(
+ 'python' 'python-setuptools' 'cython'
+ 'python2' 'python2-setuptools' 'cython2')
options=(!emptydirs)
-source=("git+https://github.com/daler/pybedtools.git")
-md5sums=('SKIP')
+source=("${_name}"-"${pkgver}"::git+https://github.com/daler/"${_name}".git)
+sha256sums=('SKIP')
pkgver() {
- cd "pybedtools"
+ cd "${_name}"-"${pkgver}"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed s'/v//'
}
+prepare() {
+ cp -a "${_name}"-"${pkgver}"{,-py2}
+}
+
package() {
- cd "${srcdir}/pybedtools"
+ cd "${srcdir}"/"${_name}"-"${pkgver}"
python setup.py install --root="${pkgdir}/" --optimize=1
}
+
+build(){
+ cd "${srcdir}"/"${_name}"-"${pkgver}"
+ python setup.py build
+
+ cd "${srcdir}"/"${_name}"-"${pkgver}"-py2
+ python2 setup.py build
+}
+
+package_python2-pybedtools-git() {
+ depends=(
+ 'bedtools'
+ 'python2'
+ 'python2-numpy'
+ 'python2-pandas'
+ 'python2-pysam'
+ 'python2-six')
+ optdepends=(
+ 'htslib: for working with SAM/BAM/CRAM files'
+ 'python2-matplotlib: for plotting genomic intervals'
+ 'ucsc-kent-genome-tools: for bedgraph to bigwig conversions')
+
+ cd "${_name}"-"${pkgver}"-py2
+ python2 setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
+ install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE.txt
+
+ sed 's/python/python2/g' "${pkgdir}"/usr/bin/pybedtools
+ mv "${pkgdir}"/usr/bin/pybedtools "${pkgdir}"/usr/bin/pybedtools2
+
+ for script in "${pkgdir}"/usr/bin/*.py;do
+ mv "${script}" "${pkgdir}"/usr/bin/$(basename "${script%.*py}")2.py
+ done
+}
+
+package_python-pybedtools-git() {
+ depends=(
+ 'bedtools'
+ 'python'
+ 'python-numpy'
+ 'python-pandas'
+ 'python-pysam'
+ 'python-six')
+ optdepends=(
+ 'htslib: for working with SAM/BAM/CRAM files'
+ 'python-matplotlib: for plotting genomic intervals'
+ 'ucsc-kent-genome-tools: for bedgraph to bigwig conversions')
+
+ cd "${_name}"-"${pkgver}"
+ python setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
+ install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE.txt
+}