[arch-commits] Commit in python2-nltk/trunk (PKGBUILD)
Alexander Rødseth
arodseth at nymeria.archlinux.org
Mon Apr 7 21:42:22 UTC 2014
Date: Monday, April 7, 2014 @ 23:42:22
Author: arodseth
Revision: 108945
upgpkg: python2-nltk 3.0a3-1
Modified:
python2-nltk/trunk/PKGBUILD
----------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 36 insertions(+), 14 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-04-07 21:26:40 UTC (rev 108944)
+++ PKGBUILD 2014-04-07 21:42:22 UTC (rev 108945)
@@ -3,33 +3,55 @@
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Chris Baker <baker.chris.3 at gmail.com>
-pkgname=python2-nltk
-pkgver=2.0.4
+pkgbase=python2-nltk
+pkgname=('python2-nltk' 'python-nltk')
+
+# NOTE: Using an alpha version because it's the first version to support
+# both python 2 and 3. It makes it better suited for a split package.
+pkgver=3.0a3
+
pkgrel=1
pkgdesc='Natural language processing in Python'
arch=('any')
url='http://www.nltk.org/'
license=('APACHE')
-depends=('python2-yaml')
-optdepends=('nltk-data: test data'
- 'python2-numpy: used for calculations'
- 'python2-matplotlib: used for plotting')
-replaces=('python-nltk')
-provides=('python-nltk')
-source=("http://pypi.python.org/packages/source/n/nltk/nltk-${pkgver}.tar.gz")
-sha256sums=('a554d6b9c5c7c8b597a090d8848a6f78c6fc4665ae43c9a6a6d6a5b207d98c65')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("http://www.nltk.org/nltk3-alpha/nltk-$pkgver.tar.gz")
+sha256sums=('52621b3bf944dcae8cbd352ef2664edc95edfeaee321f3f021cfa55ce23eb117')
-build() {
- cd nltk-$pkgver
+prepare() {
+ cp -r "nltk-$pkgver" "nltk-py2-$pkgver"
# python 2 fix
+ cd "nltk-py2-$pkgver"
find . -type f -exec sed -i 's:^#.*env python:#!/usr/bin/env python2:' {} +
+}
+
+build() {
+ cd "$srcdir/nltk-$pkgver"
+ python setup.py build
+
+ cd "$srcdir/nltk-py2-$pkgver"
python2 setup.py build
}
-package() {
- cd nltk-$pkgver
+package_python-nltk() {
+ optdepends=('nltk-data: test data'
+ 'python-numpy: used for calculations'
+ 'python-matplotlib: used for plotting')
+ depends=('python-yaml')
+ cd "nltk-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-nltk() {
+ optdepends=('nltk-data: test data'
+ 'python2-numpy: used for calculations'
+ 'python2-matplotlib: used for plotting')
+ depends=('python2-yaml')
+
+ cd "nltk-py2-$pkgver"
python2 setup.py install --root="$pkgdir" --optimize=1
}
More information about the arch-commits
mailing list