From 59fbefc013e006f67ca08e58ec067108de01ace5 Mon Sep 17 00:00:00 2001 From: Syrus Dark Date: Tue, 12 Jan 2021 01:43:40 +0530 Subject: [PATCH] Towards completing packing pip 20.2.4 not yet done fully still need to test --- mingw-w64-python-appdirs/PKGBUILD | 4 +-- mingw-w64-python-certifi/PKGBUILD | 4 +-- mingw-w64-python-contextlib2/PKGBUILD | 4 +-- mingw-w64-python-csv23/PKGBUILD | 36 ++++++++++++++++++++++ mingw-w64-python-distro/PKGBUILD | 44 +++++++++++++++++++++++++++ mingw-w64-python-packaging/PKGBUILD | 4 +-- mingw-w64-python-pip/PKGBUILD | 21 ++++++++----- mingw-w64-python-requests/PKGBUILD | 4 +-- mingw-w64-python-resolvelib/PKGBUILD | 35 +++++++++++++++++++++ mingw-w64-python-scripttest/PKGBUILD | 36 ++++++++++++++++++++++ mingw-w64-python-toml/PKGBUILD | 6 ++-- 11 files changed, 177 insertions(+), 21 deletions(-) create mode 100644 mingw-w64-python-csv23/PKGBUILD create mode 100644 mingw-w64-python-distro/PKGBUILD create mode 100644 mingw-w64-python-resolvelib/PKGBUILD create mode 100644 mingw-w64-python-scripttest/PKGBUILD diff --git a/mingw-w64-python-appdirs/PKGBUILD b/mingw-w64-python-appdirs/PKGBUILD index 2263934482..7faab1e9b1 100644 --- a/mingw-w64-python-appdirs/PKGBUILD +++ b/mingw-w64-python-appdirs/PKGBUILD @@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.4.3 +pkgver=1.4.4 pkgrel=1 pkgdesc='A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir" (mingw-w64)' arch=('any') @@ -15,7 +15,7 @@ license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-python") makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") source=("https://pypi.io/packages/source/a/appdirs/appdirs-${pkgver}.tar.gz") -sha256sums=('9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92') +sha256sums=('7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41') prepare() { cd "$srcdir" diff --git a/mingw-w64-python-certifi/PKGBUILD b/mingw-w64-python-certifi/PKGBUILD index d29bc84cba..524791586e 100644 --- a/mingw-w64-python-certifi/PKGBUILD +++ b/mingw-w64-python-certifi/PKGBUILD @@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=2019.11.28 +pkgver=2020.12.5 pkgrel=1 pkgdesc="Python package for providing Mozilla's CA Bundle (mingw-w64)" url='https://pypi.python.org/pypi/certifi' @@ -15,7 +15,7 @@ arch=('any') depends=("${MINGW_PACKAGE_PREFIX}-python") makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz") -sha256sums=('25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f') +sha256sums=('1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c') prepare() { cd ${srcdir} diff --git a/mingw-w64-python-contextlib2/PKGBUILD b/mingw-w64-python-contextlib2/PKGBUILD index 5e715b50d3..8a3a105df6 100644 --- a/mingw-w64-python-contextlib2/PKGBUILD +++ b/mingw-w64-python-contextlib2/PKGBUILD @@ -6,7 +6,7 @@ pkgname="${MINGW_PACKAGE_PREFIX}-python-${_realname}" provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=0.6.0 +pkgver=0.6.0.post1 pkgrel=1 pkgdesc="contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions (mingw-w64)" arch=('any') @@ -15,7 +15,7 @@ license=('PSF') depends=("${MINGW_PACKAGE_PREFIX}-python") makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz") -sha512sums=('01901ac226c7fca40add00e95cedb2535a802e0114a53ae1315c6dfee20744dbafa7d9619986ad76345ad9b9aa3e364ac01d23f51b5eb70dd2febd5af1f1fc56') +sha512sums=('bd3b458b365bc1d556476f6368bc523fde07e85afdad74037aa98d7a498008103a789f6b481b606700da92606ee6477fc5a817f1596e93a6e3c548ed0d4a5bf8') prepare() { cd "${srcdir}" diff --git a/mingw-w64-python-csv23/PKGBUILD b/mingw-w64-python-csv23/PKGBUILD new file mode 100644 index 0000000000..f419210db0 --- /dev/null +++ b/mingw-w64-python-csv23/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Naveen M K + +_realname=csv23 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=0.3.2 +pkgrel=1 +pkgdesc="Python 2/3 unicode CSV compatibility layer (mingw-w64)" +arch=('any') +url='https://github.com/xflr6/csv23' +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") +source=("https://files.pythonhosted.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.zip") +sha512sums=('330161d4b737c1a8a832e5eba52a8fbf0bb77ea4c5c4d0e29dfbd1c9cff23c139167437e664545ae002462f11ff87419203ae73e2c40c01bc7a7fb94f4846e91') + +prepare() { + cd "${srcdir}" + rm -rf python-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} +} + +build() { + msg "Python build for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python setup.py build +} + +package() { + cd "${srcdir}/python-build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 --skip-build +} diff --git a/mingw-w64-python-distro/PKGBUILD b/mingw-w64-python-distro/PKGBUILD new file mode 100644 index 0000000000..c9b1157538 --- /dev/null +++ b/mingw-w64-python-distro/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Naveen M K +# +_realname=distro +pkgbase=mingw-w64-python-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python-${_realname}" +pkgver=1.5.0 +pkgrel=1 +pkgdesc="Distro - an OS platform information API (mingw-w64)" +arch=('any') +url="https://pypi.org/project/${_realname}" +license=('Apache2.0') +depends=("${MINGW_PACKAGE_PREFIX}-python") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") +source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz") +sha512sums=('14831fe1355e9ef4f58f273ce4a548a3fe438e95466b4b4f596b8110da51305d66ed77c2e40c3dbfbcbd1a66c74e23a4d4244c8bfdebc4b49b3e7ddcbff55b8f') + +prepare() { + cd "${srcdir}" + rm -rf python-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" + + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} + export PBR_VERSION=${pkgver} +} + +build() { + msg "Python build for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python setup.py build +} + +package() { + cd "${srcdir}/python-build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --skip-build + 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 -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt" +} diff --git a/mingw-w64-python-packaging/PKGBUILD b/mingw-w64-python-packaging/PKGBUILD index 37795dbeab..8e6a95045a 100644 --- a/mingw-w64-python-packaging/PKGBUILD +++ b/mingw-w64-python-packaging/PKGBUILD @@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=20.3 +pkgver=20.4 pkgrel=1 pkgdesc="Core utilities for Python packages (mingw-w64)" arch=('any') @@ -21,7 +21,7 @@ checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-runner" "${MINGW_PACKAGE_PREFIX}-python-pretend" "${MINGW_PACKAGE_PREFIX}-python-coverage") source=(https://pypi.io/packages/source/p/packaging/${_realname}-${pkgver}.tar.gz) -sha256sums=('3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3') +sha256sums=('4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8') prepare() { cd "${srcdir}" diff --git a/mingw-w64-python-pip/PKGBUILD b/mingw-w64-python-pip/PKGBUILD index ccd74c0668..0da3e5d20f 100644 --- a/mingw-w64-python-pip/PKGBUILD +++ b/mingw-w64-python-pip/PKGBUILD @@ -3,9 +3,6 @@ _realname=pip pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") -provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=20.2.4 pkgrel=1 pkgdesc="An easy_install replacement for installing pypi python packages (mingw-w64)" @@ -17,20 +14,24 @@ depends=("${MINGW_PACKAGE_PREFIX}-python-appdirs" "${MINGW_PACKAGE_PREFIX}-python-colorama" "${MINGW_PACKAGE_PREFIX}-python-contextlib2" "${MINGW_PACKAGE_PREFIX}-python-distlib" + "${MINGW_PACKAGE_PREFIX}-python-distro" "${MINGW_PACKAGE_PREFIX}-python-html5lib" - "${MINGW_PACKAGE_PREFIX}-python-lockfile" "${MINGW_PACKAGE_PREFIX}-python-msgpack" "${MINGW_PACKAGE_PREFIX}-python-packaging" "${MINGW_PACKAGE_PREFIX}-python-pep517" "${MINGW_PACKAGE_PREFIX}-python-progress" "${MINGW_PACKAGE_PREFIX}-python-pyparsing" - "${MINGW_PACKAGE_PREFIX}-python-pytoml" "${MINGW_PACKAGE_PREFIX}-python-requests" + "${MINGW_PACKAGE_PREFIX}-python-resolvelib" "${MINGW_PACKAGE_PREFIX}-python-retrying" + "${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-python-six" + "${MINGW_PACKAGE_PREFIX}-python-toml" "${MINGW_PACKAGE_PREFIX}-python-webencodings") -makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" - "${MINGW_PACKAGE_PREFIX}-python-sphinx") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-sphinx") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest" + "${MINGW_PACKAGE_PREFIX}-python-scripttest" + "${MINGW_PACKAGE_PREFIX}-python-csv23") install=${_realname}3-${CARCH}.install source=(${_realname}-${pkgver}.tar.gz::https://github.com/pypa/pip/archive/${pkgver}.tar.gz) noextract=(${_realname}-${pkgver}.tar.gz) @@ -59,7 +60,11 @@ build() { cd "${srcdir}/python-build-${CARCH}" ${MINGW_PREFIX}/bin/python setup.py build } - +check() { + msg "Python test for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/pytest tests +} package() { local _mingw_prefix=$(cygpath -wm ${MINGW_PREFIX}) diff --git a/mingw-w64-python-requests/PKGBUILD b/mingw-w64-python-requests/PKGBUILD index ad59ef62ef..3d08ce1643 100644 --- a/mingw-w64-python-requests/PKGBUILD +++ b/mingw-w64-python-requests/PKGBUILD @@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=2.23.0 +pkgver=2.24.0 pkgrel=1 pkgdesc="Requests is the only Non-GMO HTTP library for Python, safe for human consumption (mingw-w64)" arch=('any') @@ -21,7 +21,7 @@ checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-httpbin" "${MINGW_PACKAGE_PREFIX}-python-pysocks") optdepends=("${MINGW_PACKAGE_PREFIX}-python-pysocks: SOCKS proxy support") source=("${_realname}-${pkgver}.tar.gz::https://github.com/kennethreitz/requests/archive/v${pkgver}.tar.gz") -sha256sums=('bf063ded6c5c3f238f89189a791df4a22270d1ccd88b1a21687ecb6a9c6b1335') +sha256sums=('904e9a2bd22e98e444f5b23f80fa3fb8dda5d1e81d0f87d9ee56af2e15f73862') prepare() { cd "${srcdir}" diff --git a/mingw-w64-python-resolvelib/PKGBUILD b/mingw-w64-python-resolvelib/PKGBUILD new file mode 100644 index 0000000000..ef8e15d7d2 --- /dev/null +++ b/mingw-w64-python-resolvelib/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: Naveen M K + +_realname=resolvelib +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=0.4.0 +pkgrel=1 +pkgdesc="Resolve abstract dependencies into concrete ones (mingw-w64)" +arch=('any') +license=('ISC') +url="https://github.com/sarugaku/resolvelib" +depends=("${MINGW_PACKAGE_PREFIX}-python") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") +source=("${_realname}-${pkgver}.tar.gz::https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz") +sha256sums=('93e42cf712534cf8dccb146c0c20521a5ac344ef8ec6e7742a49b22a24335662') + +prepare() { + cd "${srcdir}" + rm -rf python-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" +} + +build() { + msg "Python build for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python setup.py build +} + +package() { + cd "${srcdir}/python-build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" +} diff --git a/mingw-w64-python-scripttest/PKGBUILD b/mingw-w64-python-scripttest/PKGBUILD new file mode 100644 index 0000000000..bca04dd3e9 --- /dev/null +++ b/mingw-w64-python-scripttest/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Naveen M K + +_realname=scripttest +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=1.3 +pkgrel=1 +pkgdesc="Helper to test command-line scripts (mingw-w64)" +arch=('any') +url='https://pypi.org/project/scripttest/' +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") +source=("https://files.pythonhosted.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz") +sha512sums=('a54aab83e102a8aa9fdbbcbaff5e8b758886c2db2d1eefee9448895b5ebd8d10115a86d810a39acc82917c17664d9225403cb8fdb2a7631ab1b601a791897a0e') + +prepare() { + cd "${srcdir}" + rm -rf python-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} +} + +build() { + msg "Python build for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python setup.py build +} + +package() { + cd "${srcdir}/python-build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 --skip-build +} diff --git a/mingw-w64-python-toml/PKGBUILD b/mingw-w64-python-toml/PKGBUILD index 6daf3f1ed0..3de81a15c2 100644 --- a/mingw-w64-python-toml/PKGBUILD +++ b/mingw-w64-python-toml/PKGBUILD @@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=0.10.0 +pkgver=0.10.1 pkgrel=1 pkgdesc="A Python library for parsing and creating TOML (mingw-w64)" arch=('any') @@ -18,8 +18,8 @@ checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest") options=('staticlibs' 'strip' '!debug') source=("https://files.pythonhosted.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz" "https://raw.githubusercontent.com/uiri/toml/master/test.toml") -sha512sums=('26f26c38ce9cd48305218c2c34c5a5407b00aefc25a933f044bb7be22c23cfdfa3b8cf2da952d17760c4b9038df62e405fa039cc7b63dd3e94c9c312f04f9182' - '47510e59f9e0bdaaf4052fc5edb570a36b8b173ed7b8e5fac52804f6619f409e545ae3c91f838dbaeefe3c7cfd1a835b699164ac631feaa61de971d2381ac246') +sha512sums=('9dc813f84b56bee6519c70efe49a834d6695c82d429f0b7cc6e6153a1fb14d3fb627dea24df2d2664354f27108389d51475609272d59fc7e4b64a2c17d74f33f' + '86e43e2fc69e442b9ee8b78f72ce4a9ea2814d926744ed29c8908e1e4bdafa6e0777e47a43c5d0168f72a2c44844faaf7f5ce14db420a116d07c36715ea69a02') # Helper macros to help make tasks easier # apply_patch_with_msg() {