Files
MSYS2-packages/python-setuptools/PKGBUILD
T
Christoph Reiter a0902f1e21 Use pypi PURLs instead of plain pypi names
This allows us to include a version and we already use PURL
for other things, so might as well remove the pypi special case.

Normalize the names, since that is required for PURLs.
2025-02-16 20:58:55 +01:00

52 lines
1.4 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=setuptools
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=75.8.0
pkgrel=1
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
arch=('any')
license=('PSF')
url="https://pypi.python.org/pypi/setuptools"
msys2_repository_url="https://github.com/pypa/setuptools"
msys2_references=(
"anitya: 4021"
"purl: pkg:pypi/setuptools"
"cpe: cpe:/a:python:setuptools"
)
depends=('python')
provides=("python3-${_realname}" 'python3-distribute')
replaces=("python3-${_realname}" 'python3-distribute')
conflicts=("python3-${_realname}")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/pypa/setuptools/archive/v${pkgver}.tar.gz")
sha256sums=('7a1ab1a2335ac305db3297961774d516d39fe516a9495832011ed16105a439c2')
build() {
cd "${srcdir}/setuptools-${pkgver}"
python setup.py egg_info
python setup.py build
}
check() { (
# Workaround UTF-8 tests by setting LC_CTYPE
export LC_CTYPE=en_US.UTF-8
# https://github.com/pypa/setuptools/pull/810
export PYTHONDONTWRITEBYTECODE=1
# Check python module
# cd "${srcdir}/setuptools-${pkgver}"
# /usr/bin/python setup.py pytest
)}
package() {
cd "${srcdir}/setuptools-${pkgver}"
python setup.py install --prefix=/usr --root="$pkgdir" --skip-build
# Remove all .exe files
find "$pkgdir" -type f -name '*.exe' -delete
}