mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 18:47:15 +08:00
74 lines
2.1 KiB
Bash
74 lines
2.1 KiB
Bash
#
|
|
# Software packages for Chakra, part of www.chakra-project.org
|
|
#
|
|
# Maintainer: H W Tovetjärn (totte) <totte@tott.es>
|
|
# Contributors: A Velasquez <angvp@archlinux.org>
|
|
|
|
pkgbase=python-setuptools
|
|
pkgname=('python3-setuptools' 'python2-setuptools')
|
|
pkgver=1.1.6
|
|
pkgrel=3
|
|
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
|
|
arch=('any')
|
|
license=('PSF')
|
|
url="http://pypi.python.org/pypi/setuptools"
|
|
makedepends=('python3' 'python2')
|
|
source=(http://pypi.python.org/packages/source/s/setuptools/setuptools-${pkgver}.tar.gz)
|
|
sha512sums=('68acb06423f23c4f31889af32cb0a238ef1ba708a7097e91e4463175d347bacb545c7631233f6be9bb1ca0501391192e1e752148766da919eb0db1b92f0e5670')
|
|
|
|
#check() {
|
|
# # Check python3 module
|
|
# cd "${srcdir}"/setuptools-${pkgver}
|
|
# python3 setup.py test
|
|
#
|
|
# # Check python2 module
|
|
# cd "${srcdir}"/setuptools-${pkgver}-python2
|
|
# python2 setup.py test
|
|
#}
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
|
|
pushd setuptools-${pkgver}
|
|
popd
|
|
|
|
cp -a setuptools-${pkgver}{,-python2}
|
|
|
|
cd "${srcdir}"/setuptools-${pkgver}
|
|
sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" setuptools/tests/test_resources.py
|
|
|
|
cd ../setuptools-${pkgver}-python2
|
|
sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py
|
|
}
|
|
|
|
build() {
|
|
# Build python 3 module
|
|
cd "${srcdir}"/setuptools-${pkgver}
|
|
python3 setup.py build
|
|
|
|
# Build python 2 module
|
|
cd ../setuptools-${pkgver}-python2
|
|
python2 setup.py build
|
|
}
|
|
|
|
package_python3-setuptools() {
|
|
depends=('python3>=3.3')
|
|
provides=('python3-distribute')
|
|
conflicts=('python3-distribute')
|
|
replaces=('python3-distribute')
|
|
|
|
cd "${srcdir}/setuptools-${pkgver}"
|
|
python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
|
|
}
|
|
|
|
package_python2-setuptools() {
|
|
depends=('python2>=2.7')
|
|
provides=('python-distribute' 'python2-distribute')
|
|
conflicts=('python-distribute' 'python2-distribute')
|
|
replaces=('python-distribute' 'python2-distribute')
|
|
|
|
cd "${srcdir}/setuptools-${pkgver}-python2"
|
|
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
|
|
rm "${pkgdir}/usr/bin/easy_install"
|
|
}
|