Files
MINGW-packages/mingw-w64-python-requests-unixsocket/PKGBUILD
Biswapriyo Nath e2bd3977e9 python-requests-unixsocket: Use python-build to build
This fixes the following error.
AttributeError: module 'setuptools.command.easy_install' has no attribute 'get_script_args'
2024-11-04 14:30:42 +00:00

46 lines
1.4 KiB
Bash

# Contributor: Raed Rizqie <raed.rizqie@gmail.com>
_realname=requests-unixsocket
pkgbase=mingw-w64-python-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-python-${_realname}
pkgver=0.3.0
pkgrel=5
pkgdesc='Use requests to talk HTTP via a UNIX domain socket (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/msabramo/requests-unixsocket'
msys2_references=(
'pypi: requests-unixsocket'
)
license=('spdx:Apache-2.0')
depends=(
${MINGW_PACKAGE_PREFIX}-python
${MINGW_PACKAGE_PREFIX}-python-requests
${MINGW_PACKAGE_PREFIX}-python-urllib3)
makedepends=(
${MINGW_PACKAGE_PREFIX}-python-pbr
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('28304283ea9357d45fff58ad5b11e47708cfbf5806817aa59b2a363228ee971e')
build() {
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
export PBR_VERSION=${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}