The latest releases don't work for some reason. Use the last release before the bootstrap changes for now.
58 lines
1.7 KiB
Bash
58 lines
1.7 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=setuptools
|
|
pkgbase="python-${_realname}"
|
|
pkgname=("python-${_realname}")
|
|
pkgver=52.0.0
|
|
pkgrel=1
|
|
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
|
|
arch=('any')
|
|
license=('PSF')
|
|
url="https://pypi.python.org/pypi/setuptools"
|
|
depends=('python')
|
|
provides=("python3-${_realname}" 'python3-distribute')
|
|
replaces=("python3-${_realname}" 'python3-distribute')
|
|
conflicts=("python3-${_realname}")
|
|
source=("${_realname}-${pkgver}.tar.gz::https://github.com/pypa/setuptools/archive/v${pkgver}.tar.gz")
|
|
sha512sums=('f397181a94d1bd3afbf2d1279554df9d448af963886c53ab391eeb6482a4fc6baf9434b5c6a8da36ae0e1d8f5274c93cb2b37d996112880cb2bad8c7767ac1b1')
|
|
|
|
prepare() {
|
|
# Don't download and install deps
|
|
sed -i '/pip.main(args)/d' setuptools-${pkgver}/bootstrap.py
|
|
|
|
# Remove post-release tag since we are using stable tags
|
|
sed -e '/tag_build = .post/d' \
|
|
-e '/tag_date = 1/d' \
|
|
-i setuptools-${pkgver}/setup.cfg
|
|
|
|
cd "${srcdir}"/setuptools-${pkgver}
|
|
sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py
|
|
|
|
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
|
|
}
|
|
|
|
build() {
|
|
# Build python module
|
|
cd "${srcdir}"/setuptools-${pkgver}
|
|
/usr/bin/python bootstrap.py
|
|
/usr/bin/python setup.py build
|
|
}
|
|
|
|
check() { (
|
|
# Workaround UTF-8 tests by setting LC_CTYPE
|
|
export LC_CTYPE=en_US.UTF-8
|
|
|
|
# https://github.com/pypa/setuptools/pull/810
|
|
export PYTHONDONTWRITEBYTECODE=1
|
|
|
|
# Check python module
|
|
# cd "${srcdir}"/setuptools-${pkgver}
|
|
# /usr/bin/python setup.py pytest
|
|
)}
|
|
|
|
package() {
|
|
cd "${srcdir}"/setuptools-${pkgver}
|
|
|
|
/usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
|
|
}
|