# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sebastien Binet <binet@farnsworth>

pkgname=python-distribute
pkgver=0.6.15
pkgrel=2
pkgdesc="Easily build and distribute Python packages"
arch=('any')
license=('PSF')
url="http://pypi.python.org/pypi/distribute"
depends=('python>=2.6')
provides=('setuptools=0.6c11' 'python2-distribute')
conflicts=('setuptools')
makedepends=('python2')
source=("http://pypi.python.org/packages/source/d/distribute/distribute-${pkgver}.tar.gz"
        'distribute-python2_and_3.patch')
md5sums=('ea52e1412e7ff560c290266ed400e216'
         'bbf5554ade06f27285f81ed8a8a3a3f8')

build() {
   cd "${srcdir}/distribute-${pkgver}"

   # Build python 2 module
   patch -Np1 < ${srcdir}/distribute-python2_and_3.patch
   python2 setup.py build
   python2 setup.py test
}

package() {
   cd "${srcdir}/distribute-${pkgver}"
   python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
}
# vim:set ts=2 sw=2 et:
