summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d148198543668420b6fd5d6ccc85aa47d69fcef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: Rich Li <rich@dranek.com>
pkgname='python2-cyordereddict'
pkgver=0.2.2
pkgrel=1
pkgdesc="Cython implementation of OrderedDict"
url="https://pypi.python.org/pypi/cyordereddict"
arch=('x86_64' 'i686')
license=('MIT')
makedepends=('python2-setuptools' 'cython2')
depends=('python2')
checkdepends=('python2-nose')
#source=(https://pypi.python.org/packages/source/c/cyordereddict/cyordereddict-"$pkgver".tar.gz)
source=(https://github.com/shoyer/cyordereddict/archive/v"$pkgver".tar.gz)
# Note the PyPI and github sources have different checksums. This is because the github version doesn't include the Cython output, but the PyPI does. Since we're using the github source we therefore have Cython as a makedep.
md5sums=('d78aebebe365fbcba0ab5823be0e06f5')
 
build() {
  cd "$srcdir/cyordereddict-$pkgver"
  python2 setup.py build --with-cython
}

# pyvenv is python 3.4 only, so this has to be updated for python 2.7 
# check() {
#   cd "$srcdir/cyordereddict-$pkgver"
# 
#   # We use pyvenv to create a virtual environment where the package will be installed, then we can test it. Note that we symlink to the system site-packages so we have (read-only) access to nosetests.
#   pyvenv arch_test --system-site-packages
#   _venv_python="arch_test/bin/python"
# 
#   ${_venv_python} setup.py install
#   ${_venv_python} $(which nosetests) cyordereddict ./python3/cyordereddict/test
# }
 
package() {
  cd "$srcdir/cyordereddict-$pkgver"
  python2 setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1

  # MIT License
  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et: