46 lines
1.5 KiB
Bash
46 lines
1.5 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=pip
|
|
pkgbase=mingw-w64-python2-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}")
|
|
pkgver=20.3.4
|
|
pkgrel=1
|
|
pkgdesc="An easy_install replacement for installing pypi python packages (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64')
|
|
url="https://pip.pypa.io/"
|
|
msys2_references=(
|
|
"cpe: cpe:/a:pypa:pip"
|
|
"pypi: pip"
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
install=${_realname}2-${MSYSTEM}.install
|
|
source=(https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz)
|
|
sha256sums=('6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc')
|
|
|
|
build() {
|
|
cd "${srcdir}/${_realname}-${pkgver}"
|
|
|
|
${MINGW_PREFIX}/bin/python2 setup.py build
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${_realname}-${pkgver}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build -v
|
|
|
|
rm -f "${pkgdir}"${MINGW_PREFIX}/bin/pip{.exe,.exe.manifest,-script.py}
|
|
|
|
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
|
# fix python command in files
|
|
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
|
|
sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \
|
|
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f}
|
|
done
|
|
|
|
install -D -m644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
|
|
}
|