From 375b91ebcd65e793113fc235506b1b2366311e8c Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 30 Jan 2021 17:54:15 -0500 Subject: [PATCH] python-pip: split package New package: python3-pip-21.0.1 --- srcpkgs/python-pip/template | 20 ++++------------ srcpkgs/python-pip/update | 3 ++- srcpkgs/python3-pip | 1 - .../patches/no-versioned-pip.patch | 13 +++++++++++ srcpkgs/python3-pip/template | 23 +++++++++++++++++++ 5 files changed, 43 insertions(+), 17 deletions(-) delete mode 120000 srcpkgs/python3-pip create mode 100644 srcpkgs/python3-pip/patches/no-versioned-pip.patch create mode 100644 srcpkgs/python3-pip/template diff --git a/srcpkgs/python-pip/template b/srcpkgs/python-pip/template index 1fd9fce6e69..096aa7b63b2 100644 --- a/srcpkgs/python-pip/template +++ b/srcpkgs/python-pip/template @@ -1,10 +1,10 @@ # Template file for 'python-pip' pkgname=python-pip -version=20.3.3 +version=20.3.4 revision=1 wrksrc="pip-${version}" -build_style=python-module -hostmakedepends="python-setuptools python3-setuptools" +build_style=python2-module +hostmakedepends="python-setuptools" depends="python-setuptools" short_desc="PyPA recommended tool for installing PyPI packages (Python2)" maintainer="Alessio Sergi " @@ -12,19 +12,9 @@ license="MIT" homepage="https://pip.pypa.io/" changelog="https://raw.githubusercontent.com/pypa/pip/master/NEWS.rst" distfiles="${PYPI_SITE}/p/pip/pip-${version}.tar.gz" -checksum=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba +checksum=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc post_install() { vlicense LICENSE.txt -} - -python3-pip_package() { - depends="python3-setuptools" - short_desc="${short_desc/Python2/Python3}" - pkg_install() { - vmove usr/bin/pip3 - mv ${PKGDESTDIR}/usr/bin/pip{3,} - vmove ${py3_lib} - vlicense LICENSE.txt - } + mv ${DESTDIR}/usr/bin/pip{,2} } diff --git a/srcpkgs/python-pip/update b/srcpkgs/python-pip/update index 724819677ce..88ebcc780cf 100644 --- a/srcpkgs/python-pip/update +++ b/srcpkgs/python-pip/update @@ -1 +1,2 @@ -pattern='pip-\K[0-9.]+(?=.tar.gz)' +# Support for Python 2 was dropped in pip >= 21 +pattern='pip-\K20\.[0-9.]+(?=.tar.gz)' diff --git a/srcpkgs/python3-pip b/srcpkgs/python3-pip deleted file mode 120000 index 9de2412ef67..00000000000 --- a/srcpkgs/python3-pip +++ /dev/null @@ -1 +0,0 @@ -python-pip \ No newline at end of file diff --git a/srcpkgs/python3-pip/patches/no-versioned-pip.patch b/srcpkgs/python3-pip/patches/no-versioned-pip.patch new file mode 100644 index 00000000000..b3a50bb2c13 --- /dev/null +++ b/srcpkgs/python3-pip/patches/no-versioned-pip.patch @@ -0,0 +1,13 @@ +--- setup.py.orig 2021-01-30 17:47:39.874134606 -0500 ++++ setup.py 2021-01-30 17:47:54.435139352 -0500 +@@ -74,10 +74,6 @@ + entry_points={ + "console_scripts": [ + "pip=pip._internal.cli.main:main", +- "pip{}=pip._internal.cli.main:main".format(sys.version_info[0]), +- "pip{}.{}=pip._internal.cli.main:main".format( +- *sys.version_info[:2] +- ), + ], + }, + diff --git a/srcpkgs/python3-pip/template b/srcpkgs/python3-pip/template new file mode 100644 index 00000000000..d0a3a1d7516 --- /dev/null +++ b/srcpkgs/python3-pip/template @@ -0,0 +1,23 @@ +# Template file for 'python3-pip' +pkgname=python3-pip +version=21.0.1 +revision=1 +wrksrc="pip-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-setuptools" +short_desc="PyPA recommended tool for installing PyPI packages (Python3)" +maintainer="Andrew J. Hesford " +license="MIT" +homepage="https://pip.pypa.io/" +changelog="https://raw.githubusercontent.com/pypa/pip/master/NEWS.rst" +distfiles="${PYPI_SITE}/p/pip/pip-${version}.tar.gz" +checksum=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 + +do_check() { + : tests have unpackaged dependencies +} + +post_install() { + vlicense LICENSE.txt +}