mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/virtualenv-16.7.8: Version bump, add pypy{,3}
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.80, Repoman-2.3.19 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
This commit is contained in:
committed by
Patrick McLean
parent
dc9289a782
commit
4f8ccb3aa4
@@ -1,3 +1,4 @@
|
||||
DIST virtualenv-15.1.0.tar.gz 1865011 BLAKE2B aa460d9188189bf44557417a3a878f4f58d6c4a66fda2da5dd9a69e2ec04a8be6b5cf125160b1f00b4a32803dbf8231a006974499e9110101cac5e522d82eaae SHA512 46c313fe855483cf42def0ddb319df7513bb00ea2c1570efaf1236b4e0074df40d574f3858a3d3760db988b9021ca2046c40a355cc5a3ae32a2802d6120bf255
|
||||
DIST virtualenv-16.0.0.tar.gz 1968312 BLAKE2B efc25f7c12335bb8619c3de125af3693d73afc5e7ff4edf1afa95227360ab4d0eb2ffb574b9bb36de26a2bda65b1f06009308fef48b12a81050bbc1f4ab852e9 SHA512 aed6eff9b85107072c321b37c1725987d474caf615734ab40d8d1fa60f2635be1a1919a47fbd211127e38cf1c4002548c778df29fc56d45a4570b31906c0ee54
|
||||
DIST virtualenv-16.7.7.tar.gz 5113918 BLAKE2B b8189a2fa2c76f5571ff8964e644971ea3a2b7ba924eae860eb41789e3bfdb01096eca4a338a5b9634698ba4920a3ea77a5ea734dd7c6997317661ee3e7ee6f5 SHA512 d39af559c79e1a254bd6aa9a6f20db858867f858dd8cbe44141692166e7ab60bfce6f666250113cca33180a157bc65015c14ec554df335f73c1134120974d2a0
|
||||
DIST virtualenv-16.7.8.tar.gz 5116520 BLAKE2B 3a81583695abfa92193f5ffb769546abe4b8f736280bc85bca8c3f5b17c6a5ce4ed83ac2e0ee283b457bd1ce433554bfc515452cb075f4693fe0d127d2eb042b SHA512 fbecf6d0a3cb27e8b88d9063567813fbbbeda95cd6bd626cd612020c6733db762f24119ac1205aa82fcdfd0a69a8a5a084295278895fdd51a3b145aa30860206
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py
|
||||
index 620c0cb..3284cea 100644
|
||||
--- a/tests/test_virtualenv.py
|
||||
+++ b/tests/test_virtualenv.py
|
||||
@@ -5,6 +5,7 @@ import optparse
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
+import platform
|
||||
import sys
|
||||
import tempfile
|
||||
import textwrap
|
||||
@@ -342,6 +343,11 @@ def test_install_python_bin():
|
||||
|
||||
if virtualenv.IS_WIN:
|
||||
required_executables = ["python.exe", "pythonw.exe"]
|
||||
+ elif platform.python_implementation() == 'PyPy':
|
||||
+ if sys.version_info.major < 3:
|
||||
+ required_executables = ["pypy"]
|
||||
+ else:
|
||||
+ required_executables = ["pypy3"]
|
||||
else:
|
||||
py_exe_no_version = "python"
|
||||
py_exe_version_major = "python%s" % sys.version_info[0]
|
||||
@@ -549,7 +555,7 @@ def check_pypy_pre_import():
|
||||
assert module in sys.modules, "missing {!r} in sys.modules".format(module)
|
||||
|
||||
|
||||
-@pytest.mark.skipif("platform.python_implementation() != 'PyPy'")
|
||||
+@pytest.mark.skipif("platform.python_implementation() == 'PyPy'")
|
||||
def test_pypy_pre_import(tmp_path):
|
||||
"""For PyPy, some built-in modules should be pre-imported because
|
||||
some programs expect them to be in sys.modules on startup.
|
||||
@@ -622,7 +628,7 @@ def test_create_environment_from_venv(tmpdir):
|
||||
builder.setup_python(ctx)
|
||||
builder.setup_scripts(ctx)
|
||||
subprocess.check_call([ctx.env_exe, virtualenv.__file__, "--no-setuptools", "--no-pip", "--no-wheel", ve_venv_dir])
|
||||
- ve_exe = os.path.join(bin_dir, "python")
|
||||
+ ve_exe = os.path.join(bin_dir, os.getenv('EPYTHON'))
|
||||
out = subprocess.check_output([ve_exe, "-c", "import sys; print(sys.real_prefix)"], universal_newlines=True)
|
||||
# Test against real_prefix if present - we might be running the test from a virtualenv (e.g. tox).
|
||||
assert out.strip() == getattr(sys, "real_prefix", sys.prefix)
|
||||
@@ -639,7 +645,7 @@ def test_create_environment_from_venv_no_pip(tmpdir):
|
||||
builder.setup_python(ctx)
|
||||
builder.setup_scripts(ctx)
|
||||
subprocess.check_call([ctx.env_exe, virtualenv.__file__, "--no-pip", ve_venv_dir])
|
||||
- ve_exe = os.path.join(bin_dir, "python")
|
||||
+ ve_exe = os.path.join(bin_dir, os.getenv('EPYTHON'))
|
||||
out = subprocess.check_output([ve_exe, "-c", "import sys; print(sys.real_prefix)"], universal_newlines=True)
|
||||
# Test against real_prefix if present - we might be running the test from a virtualenv (e.g. tox).
|
||||
assert out.strip() == getattr(sys, "real_prefix", sys.prefix)
|
||||
@@ -657,10 +663,11 @@ def test_create_environment_with_old_pip(tmpdir):
|
||||
virtualenv.create_environment(venvdir, search_dirs=[support_dir], no_wheel=True)
|
||||
|
||||
|
||||
+@pytest.mark.skipif("platform.python_implementation() == 'PyPy'")
|
||||
def test_license_builtin(clean_python):
|
||||
_, bin_dir, _ = clean_python
|
||||
proc = subprocess.Popen(
|
||||
- (os.path.join(bin_dir, "python"), "-c", "license()"), stdin=subprocess.PIPE, stdout=subprocess.PIPE
|
||||
+ (os.path.join(bin_dir, os.getenv('EPYTHON')), "-c", "license()"), stdin=subprocess.PIPE, stdout=subprocess.PIPE
|
||||
)
|
||||
out_b, _ = proc.communicate(b"q\n")
|
||||
out = out_b.decode()
|
||||
60
dev-python/virtualenv/virtualenv-16.7.8.ebuild
Normal file
60
dev-python/virtualenv/virtualenv-16.7.8.ebuild
Normal file
@@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
# pypy{,3} dropped until test deps are tested/updated
|
||||
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} pypy{,3} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Virtual Python Environment builder"
|
||||
HOMEPAGE="
|
||||
https://virtualenv.pypa.io/en/stable/
|
||||
https://pypi.org/project/virtualenv/
|
||||
https://github.com/pypa/virtualenv/
|
||||
"
|
||||
SRC_URI="https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND=">=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
>=dev-python/pip-19.3.1-r1[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/pypiserver[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-localserver[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-timeout[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/wheel[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
DOCS=( docs/index.rst docs/changes.rst )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/virtualenv-16.7.7-tests.patch"
|
||||
|
||||
# disable tests that need internet access
|
||||
"${FILESDIR}/virtualenv-16.7.7-tests-internet.patch"
|
||||
|
||||
# test fixes for pypy
|
||||
"${FILESDIR}/virtualenv-16.7.8-tests-pypy.patch"
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs \
|
||||
dev-python/sphinx_rtd_theme \
|
||||
dev-python/towncrier
|
||||
|
||||
python_test() {
|
||||
cp "${S}"/LICENSE.txt "${BUILD_DIR}"/lib || \
|
||||
die "Could not copy LICENSE.txt with ${EPYTHON}"
|
||||
|
||||
pytest -vv tests || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
Reference in New Issue
Block a user