python2-backports.functools_lru_cache: depend on python2-backports
Also clean things up a bit and make the pkgbase match the dirname Fixes #4503
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
||||
|
||||
_realname=backports.functools_lru_cache
|
||||
pkgbase=mingw-w64-python2-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
|
||||
pkgver=1.5
|
||||
pkgrel=1
|
||||
pkgdesc="Backport of functools.lru_cache from Python 3.3 as published at ActiveState (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://github.com/jaraco/backports.functools_lru_cache'
|
||||
license=('MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2-backports")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-pytest-runner")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python2-ipaddress: for IPAddress ServerAltnames support")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/jaraco/backports.functools_lru_cache/archive/$pkgver.tar.gz")
|
||||
sha256sums=('735e2d2985f0200637feffdf0bba8ef46f7feee1fd166f2d6a30df935416e5e9')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying $_patch"
|
||||
patch -Nbp1 -i "${srcdir}/$_patch"
|
||||
done
|
||||
}
|
||||
|
||||
del_file_exists() {
|
||||
for _fname in "$@"
|
||||
do
|
||||
if [ -f $_fname ]; then
|
||||
rm -rf $_fname
|
||||
fi
|
||||
done
|
||||
}
|
||||
# =========================================== #
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
rm -rf python2-build-${CARCH} | true
|
||||
cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}"
|
||||
# Set version for setuptools_scm
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
||||
}
|
||||
|
||||
# Note that build() is sometimes skipped because it's done in
|
||||
# the packages setup.py install for simplicity if you can do so.
|
||||
# but sometimes, you want to do a check before install which would
|
||||
# also trigger the build.
|
||||
build() {
|
||||
msg "Python 2 build for ${CARCH}"
|
||||
cd python2-build-${CARCH}
|
||||
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
msg "Python 2 test for ${CARCH}"
|
||||
cd python2-build-${CARCH}
|
||||
${MINGW_PREFIX}/bin/python2 setup.py pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
||||
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
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
|
||||
# This looks odd but the backports namespace module was imported earlier
|
||||
rm "$pkgdir${MINGW_PREFIX}/lib/python2.7/site-packages/backports/"__init__.py*
|
||||
}
|
||||
|
||||
51
mingw-w64-python2-backports.functools_lru_cache/PKGBUILD
Normal file
51
mingw-w64-python2-backports.functools_lru_cache/PKGBUILD
Normal file
@@ -0,0 +1,51 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
||||
|
||||
_realname=backports.functools_lru_cache
|
||||
pkgbase=mingw-w64-python2-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
|
||||
pkgver=1.5
|
||||
pkgrel=2
|
||||
pkgdesc="Backport of functools.lru_cache from Python 3.3 as published at ActiveState (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://github.com/jaraco/backports.functools_lru_cache'
|
||||
license=('MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2-backports")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools-scm")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-pytest-runner")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python2-ipaddress: for IPAddress ServerAltnames support")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=("https://pypi.io/packages/source/b/${_realname}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('9d98697f088eb1b0fa451391f91afb5e3ebde16bbdb272819fd091151fda4f1a')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
rm -rf python2-build-${CARCH}
|
||||
cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}"
|
||||
cd python2-build-${CARCH}
|
||||
|
||||
${MINGW_PREFIX}/bin/python2 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd python2-build-${CARCH}
|
||||
|
||||
${MINGW_PREFIX}/bin/python2 setup.py pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
|
||||
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
|
||||
|
||||
# This looks odd but the backports namespace module was imported earlier
|
||||
rm "$pkgdir${MINGW_PREFIX}/lib/python2.7/site-packages/backports/"__init__.py*
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user