diff options
Diffstat (limited to 'main/py3-setuptools/APKBUILD')
-rw-r--r-- | main/py3-setuptools/APKBUILD | 69 |
1 files changed, 42 insertions, 27 deletions
diff --git a/main/py3-setuptools/APKBUILD b/main/py3-setuptools/APKBUILD index fc2640dd696..be5dcb3d449 100644 --- a/main/py3-setuptools/APKBUILD +++ b/main/py3-setuptools/APKBUILD @@ -1,34 +1,47 @@ # Contributor: Andrew Manison <amanison@anselsystems.com> # Contributor: Fabian Affolter <fabian@affolter-engineering.ch> # Contributor: Leo <thinkabit.ukim@gmail.com> -# Maintainer: +# Maintainer: Peter Shkenev <santurysim@gmail.com> pkgname=py3-setuptools -_pkgname=${pkgname#py3-} -# Be very careful when upgrading major versions as upstream -# is prone to deprecating stuff that breaks perfectly acceptable -# setup.py and setup.cfg -pkgver=52.0.0 -pkgrel=5 +pkgver=69.5.1 +pkgrel=0 pkgdesc="Collection of enhancements to the Python3 distutils" options="!check" # Tests require packages out of main/ -url="https://pypi.python.org/pypi/setuptools" +url="https://pypi.org/project/setuptools" arch="noarch" license="MIT" -depends="python3 py3-ordered-set py3-appdirs py3-packaging" -source="$_pkgname-$pkgver.tar.gz::https://github.com/pypa/$_pkgname/archive/v$pkgver.tar.gz" -builddir="$srcdir"/$_pkgname-$pkgver +# everything is vendored +depends=" + py3-packaging + python3 + " +# depends=" +# py3-appdirs +# py3-more-itertools +# py3-ordered-set +# py3-packaging +# python3 +# " +subpackages="$pkgname-pyc" +source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/s/setuptools/setuptools-$pkgver.tar.gz" +builddir="$srcdir"/setuptools-$pkgver provides="py-setuptools=$pkgver-r$pkgrel" # Backwards compatibility replaces="py-setuptools" # Backwards compatiblity +# py3-setuptools needs itself to build, bootstrapped with a lower version +# in main/py3-setuptools-stage0 +provides="$provides py3-setuptools-bootstrap" +provider_priority=100 # highest + export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0 prepare() { default_prepare # Unbundle - rm -rf pkg_resources/extern pkg_resources/_vendor \ - setuptools/extern setuptools/_vendor + # rm -rf pkg_resources/extern pkg_resources/_vendor \ + # setuptools/extern setuptools/_vendor # Upstream devendoring logic is badly broken, see: # https://bugs.archlinux.org/task/58670 @@ -36,21 +49,19 @@ prepare() { # https://github.com/pypa/setuptools/issues/1383 # The simplest fix is to simply rewrite import paths to use the canonical # location in the first place - for _module in setuptools pkg_resources '' ; do - find . -name \*.py -exec sed -i \ - -e 's/from '$_module.extern' import/import/' \ - -e 's/from '$_module.extern'./from /' \ - -e 's/import '$_module.extern'./import /' \ - -e "s/__import__('$_module.extern./__import__('/" \ - {} + - done + # for _module in setuptools pkg_resources '' ; do + # find . -name \*.py -exec sed -i \ + # -e 's/from '$_module.extern' import/import/' \ + # -e 's/from '$_module.extern'./from /' \ + # -e 's/import '$_module.extern'./import /' \ + # -e "s/__import__('$_module.extern./__import__('/" \ + # {} + + # done # Fix post-release tag sed -e '/tag_build = .post/d' \ -e '/tag_date = 1/d' \ -i setup.cfg - - python3 bootstrap.py } build() { @@ -58,10 +69,14 @@ build() { } package() { - # Otherwise it complains that build/scripts-3.9 cannot be found + local pyver="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" + # Otherwise it complains that build/scripts-3.12 cannot be found # no other changes noted - mkdir -p build/scripts-3.9 + mkdir -p build/scripts-"$pyver" - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 setup.py install --root="$pkgdir" --skip-build } -sha512sums="f397181a94d1bd3afbf2d1279554df9d448af963886c53ab391eeb6482a4fc6baf9434b5c6a8da36ae0e1d8f5274c93cb2b37d996112880cb2bad8c7767ac1b1 setuptools-52.0.0.tar.gz" + +sha512sums=" +81f4a5184976a0d4aa070261bb56458c54ec6a479786fa469e98cb336e9a1691b281ae771abe41bc5398fac15b2dd039c07cf014ee00572f46908ce6830fcb6a py3-setuptools-69.5.1.tar.gz +" |