From 5326a38ad41b164da3371378b9b63711e7509315 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 12 Jun 2023 13:59:50 +0000 Subject: [PATCH] core/python to 3.11.3-2 --- core/python/EXTERNALLY-MANAGED | 14 ++++++++++++++ core/python/PKGBUILD | 18 ++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 core/python/EXTERNALLY-MANAGED diff --git a/core/python/EXTERNALLY-MANAGED b/core/python/EXTERNALLY-MANAGED new file mode 100644 index 000000000..04823f2fb --- /dev/null +++ b/core/python/EXTERNALLY-MANAGED @@ -0,0 +1,14 @@ +[externally-managed] +Error=To install Python packages system-wide, try 'pacman -S + python-xyz', where xyz is the package you are trying to + install. + + If you wish to install a non-Arch-packaged Python package, + create a virtual environment using 'python -m venv path/to/venv'. + Then use path/to/venv/bin/python and path/to/venv/bin/pip. + + If you wish to install a non-Arch packaged Python application, + it may be easiest to use 'pipx install xyz', which will manage a + virtual environment for you. Make sure you have python-pipx + installed via pacman. + diff --git a/core/python/PKGBUILD b/core/python/PKGBUILD index a010d55c7..47d9b5a64 100644 --- a/core/python/PKGBUILD +++ b/core/python/PKGBUILD @@ -1,5 +1,6 @@ -# Maintainer: Angel Velasquez # Maintainer: Felix Yan +# Contributor: morwel +# Contributor: Angel Velasquez # Contributor: Stéphane Gaudreault # Contributor: Allan McRae # Contributor: Jason Chu @@ -13,7 +14,7 @@ shopt -s extglob pkgbase=python pkgname=(python python-tests) pkgver=3.11.3 -pkgrel=1 +pkgrel=2 _pybasever=${pkgver%.*} pkgdesc="Next generation of the python high-level scripting language" arch=('x86_64') @@ -21,9 +22,11 @@ license=('custom') url="https://www.python.org/" depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libnsl' 'libxcrypt' 'openssl' 'zlib') makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal' 'llvm' 'gdb' 'xorg-server-xvfb' 'ttf-font') -source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"{,.asc}) +source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"{,.asc} + EXTERNALLY-MANAGED) sha512sums=('a3bba4b69322a47bfeefe42ba0fd7331b5b67fd2ab41441e2219d16ef8c6f307f1a48977afd073c18cfd24ec6cb1bfe0c4bb4b273031eb524dc7e9fb5fbcc3b6' - 'SKIP') + 'SKIP' + '62a6fbfbaeaa3ba7c54e109d9c3b7f67e73bb21986da4c1fcc5d28cca83d71e0fcae28e1fc70ee8ddce7dea8cd0b64e18d1031dae3a2eae5eaa379c53efd53a0') validpgpkeys=('0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # Ned Deily (Python release signing key) 'E3FF2839C048B25C084DEBE9B26995E310250568' # Łukasz Langa (GPG langa.pl) 'A035C8C19219BA821ECEA86B64E628F8D684696D') # Pablo Galindo Salgado @@ -91,8 +94,8 @@ package_python() { 'mpdecimal: for decimal' 'xz: for lzma' 'tk: for tkinter') - provides=('python3') - replaces=('python3') + provides=('python3' 'python-externally-managed') + replaces=('python3' 'python-externally-managed') cd Python-${pkgver} @@ -119,6 +122,9 @@ package_python() { # License install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + # PEP668 + install -Dm644 "$srcdir"/EXTERNALLY-MANAGED -t "${pkgdir}/usr/lib/python${_pybasever}/" + # Split tests cd "$pkgdir"/usr/lib/python*/ rm -r {ctypes/test,distutils/tests,idlelib/idle_test,lib2to3/tests,tkinter/test,unittest/test}