dev-python/pip: remove old

Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert
2020-01-17 11:31:16 -05:00
parent 0150f44422
commit c93ddfed99
3 changed files with 1 additions and 197 deletions

View File

@@ -1,119 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7} pypy3 )
PYTHON_REQ_USE="ssl(+),threads(+)"
inherit bash-completion-r1 distutils-r1 multiprocessing
SETUPTOOLS_PV="41.4.0"
WHEEL_PV="0.33.6"
DESCRIPTION="Installs python packages -- replacement for easy_install"
HOMEPAGE="https://pip.pypa.io/ https://pypi.org/project/pip/ https://github.com/pypa/pip/"
SRC_URI="
https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
test? (
https://files.pythonhosted.org/packages/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl
https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl
)
"
# PyPI archive does not have tests, so we need to download from GitHub.
# setuptools & wheel .whl files are required for testing, exact version is not very important.
LICENSE="MIT"
KEYWORDS="~amd64 ~x86"
SLOT="0"
IUSE="test -vanilla"
# disable-system-install patch breaks tests
RESTRICT="!vanilla? ( test ) !test? ( test )"
RDEPEND="
>=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
"
DEPEND="
${RDEPEND}
test? (
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pretend[${PYTHON_USEDEP}]
<dev-python/pytest-4[${PYTHON_USEDEP}]
dev-python/pytest-cov[${PYTHON_USEDEP}]
<dev-python/pytest-rerunfailures-7.0[${PYTHON_USEDEP}]
dev-python/pytest-timeout[${PYTHON_USEDEP}]
<dev-python/pytest-xdist-1.28.0[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/scripttest[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
)
"
python_prepare_all() {
local PATCHES=(
"${FILESDIR}/${PN}-19.3-disable-version-check.patch"
)
if ! use vanilla; then
PATCHES+=( "${FILESDIR}/pip-19.1-disable-system-install.patch" )
fi
distutils-r1_python_prepare_all
if use test; then
mkdir tests/data/common_wheels/
cp "${DISTDIR}"/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl tests/data/common_wheels/ || die
cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.whl tests/data/common_wheels/ || die
fi
}
python_test () {
# pip test suite likes to test installed version of pip, both the module and the executable.
# Here we install it into a temporary dir and add to PATHs in a subshell.
EPYTHON_ROOT="${T}/${EPYTHON}_root"
esetup.py install --root "${EPYTHON_ROOT}"
if [[ ${EPYTHON} == python2* ]]; then
# These tests just fail on Python 2.
EXCLUDE_TESTS=( or pep518_uses_build_env or install_package_with_root or install_editable_with_prefix
or install_from_current_directory_into_usersite or install_user_wheel
or uninstall_from_usersite_with_dist_in_global_site
or uninstall_editable_from_usersite
or build_env_isolation
)
fi
(
export PATH="${EPYTHON_ROOT}/usr/bin:$PATH"
export PYTHONPATH="${EPYTHON_ROOT}/$(python_get_sitedir)"
# Disable VCS and network tests.
# version_check tests are excluded since we explicitly disable this feature entirely.
# uninstall test just fails, likely because of our test environment setup.
python -m pytest \
-n $(makeopts_jobs) \
--timeout 300 \
-k "not (svn or git or bazaar or mercurial or version_check or uninstall_non_local_distutils ${EXCLUDE_TESTS[*]})" \
-m "not network" \
|| die
)
}
python_install_all() {
local DOCS=( AUTHORS.txt docs/html/**/*.rst )
distutils-r1_python_install_all
COMPLETION="${T}"/completion.tmp
# 'pip completion' command embeds full $0 into completion script, which confuses
# 'complete' and causes QA warning when running as "${PYTHON} -m pip".
# This trick sets correct $0 while still calling just installed pip.
local pipcmd='import sys; sys.argv[0] = "pip"; import pip.__main__; sys.exit(pip.__main__._main())'
${PYTHON} -c "${pipcmd}" completion --bash > "${COMPLETION}" || die
newbashcomp "${COMPLETION}" ${PN}
${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die
insinto /usr/share/zsh/site-functions
newins "${COMPLETION}" _pip
}

View File

@@ -1,77 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_6 )
PYTHON_REQ_USE="threads(+)"
inherit eutils bash-completion-r1 distutils-r1
DESCRIPTION="Installs python packages -- replacement for easy_install"
HOMEPAGE="https://pip.pypa.io/ https://pypi.org/project/pip/ https://github.com/pypa/pip/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
SLOT="0"
# Check pip/_vendor/vendor.txt for this
#VENDOR_DEPEND="
# >=dev-python/distlib-0.2.2[${PYTHON_USEDEP}]
# >=dev-python/html5lib-1.0b8[${PYTHON_USEDEP}]
# >=dev-python/six-1.10.0${PYTHON_USEDEP}]
# >=dev-python/colorama-0.3.6[${PYTHON_USEDEP}]
# >=dev-python/requests-2.9.1-r2[${PYTHON_USEDEP}]
# >=dev-python/CacheControl-0.11.6[${PYTHON_USEDEP}]
# >=dev-python/lockfile-0.12.2[${PYTHON_USEDEP}]
# >=dev-python/progress-1.2[${PYTHON_USEDEP}]
# >=dev-python/packaging-16.5[${PYTHON_USEDEP}]
# >=dev-python/retrying-1.3.3[${PYTHON_USEDEP}]
# >=dev-python/pyparsing-2.1.0[${PYTHON_USEDEP}]
# virtual/python-ipaddress[${PYTHON_USEDEP}]
#"
# https://github.com/pypa/pip/issues/3057
#RDEPEND="${VENDOR_DEPEND}
# >=dev-python/setuptools-19.2[${PYTHON_USEDEP}]
# <dev-python/setuptools-19.4[${PYTHON_USEDEP}]
#"
#DEPEND="${RDEPEND}"
# required test data isn't bundled with the tarball
RESTRICT="test"
#PATCHES=(
# "${FILESDIR}"/${PN}-6.0.2-disable-version-check.patch
# "${FILESDIR}"/${PN}-8.0.0-unbundle.patch
# )
#python_prepare_all() {
# mv pip/_vendor/__init__.py "${T}" || die
# rm -r pip/_vendor/* || die
# mv "${T}"/__init__.py pip/_vendor/__init__.py || die
#
# distutils-r1_python_prepare_all
#}
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/pip-disable-system-install.patch"
"${FILESDIR}/${PN}-9.0.1-disable-version-check.patch"
)
python_install_all() {
local DOCS=( AUTHORS.txt docs/*.rst )
distutils-r1_python_install_all
COMPLETION="${T}"/completion.tmp
"${PYTHON}" -m pip completion --bash > "${COMPLETION}" || die
newbashcomp "${COMPLETION}" ${PN}
"${PYTHON}" -m pip completion --zsh > "${COMPLETION}" || die
insinto /usr/share/zsh/site-functions
newins "${COMPLETION}" _pip
}

View File

@@ -13,7 +13,7 @@ HOMEPAGE="https://pip.pypa.io/ https://pypi.org/project/pip/ https://github.com/
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
SLOT="0"
IUSE="-vanilla"