[arch-commits] Commit in python-nltk/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Jun 30 15:48:45 UTC 2018


    Date: Saturday, June 30, 2018 @ 15:48:44
  Author: felixonmars
Revision: 348319

archrelease: copy trunk to community-staging-any

Added:
  python-nltk/repos/community-staging-any/
  python-nltk/repos/community-staging-any/PKGBUILD
    (from rev 348318, python-nltk/trunk/PKGBUILD)

----------+
 PKGBUILD |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Copied: python-nltk/repos/community-staging-any/PKGBUILD (from rev 348318, python-nltk/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-06-30 15:48:44 UTC (rev 348319)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Alexander F Rødseth <xyproto at archlinux.org>
+# Contributor: Thomas Dziedzic <gostrc at gmail.com>
+# Contributor: Chris Baker <baker.chris.3 at gmail.com>
+
+pkgbase=python-nltk
+pkgname=('python2-nltk' 'python-nltk')
+pkgver=3.3
+pkgrel=2
+pkgdesc='Natural language processing in Python'
+arch=('any')
+url='http://www.nltk.org/'
+license=('APACHE')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=($pkgbase-$pkgver.tar.gz::"https://github.com/nltk/nltk/archive/$pkgver.tar.gz")
+md5sums=('f7807589f2c3609be41f33549e550888')
+
+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 nltk-$pkgver; python setup.py build)
+  (cd nltk-py2-$pkgver; python2 setup.py build)
+}
+
+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