summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-08-06 11:21:50 -0500
committerMax Rees <maxcrees@me.com>2019-08-06 20:45:49 -0500
commit15ce70d3172a3485207d9905f00ca21370fda597 (patch)
treeb8e7e1694e6c5748e8340139eb6d4ba604bf4685 /user
parent8bbeb4438e40557890e505c45e7b9e7888bd56f5 (diff)
downloadpackages-15ce70d3172a3485207d9905f00ca21370fda597.tar.gz
packages-15ce70d3172a3485207d9905f00ca21370fda597.tar.bz2
packages-15ce70d3172a3485207d9905f00ca21370fda597.tar.xz
packages-15ce70d3172a3485207d9905f00ca21370fda597.zip
user/py3-virtualenv: bump to 16.7.2
Diffstat (limited to 'user')
-rw-r--r--user/py3-virtualenv/APKBUILD21
-rw-r--r--user/py3-virtualenv/python3-provides.patch8
-rw-r--r--user/py3-virtualenv/python3.patch44
-rw-r--r--user/py3-virtualenv/test-python3.6.patch96
-rw-r--r--user/py3-virtualenv/tests.patch84
5 files changed, 146 insertions, 107 deletions
diff --git a/user/py3-virtualenv/APKBUILD b/user/py3-virtualenv/APKBUILD
index d78f6e7e7..bd609fdf2 100644
--- a/user/py3-virtualenv/APKBUILD
+++ b/user/py3-virtualenv/APKBUILD
@@ -2,37 +2,36 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=py3-virtualenv
_pkgname=virtualenv
-pkgver=16.0.0
+pkgver=16.7.2
pkgrel=0
pkgdesc="Virtual Python Environment builder"
url="https://pypi.org/project/virtualenv"
arch="noarch"
-options="net"
+# Certified net clean
license="MIT"
depends="python3"
makedepends="python3-dev"
checkdepends="py3-pytest cmd:which"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/v/$_pkgname/$_pkgname-$pkgver.tar.gz
- test-python3.6.patch"
+ python3-provides.patch
+ python3.patch
+ tests.patch"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$builddir"
python3 setup.py build
sed -ie "s/env python$/env python3/" virtualenv.py
}
check() {
- cd "$builddir"
- python3 setup.py test
- cd tests
- ./test_activate.sh
+ PIP_NO_INDEX=true PYTHONPATH="$builddir" pytest
}
package() {
- cd "$builddir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="43bc37f1da1b65e9a2df5a8813a801f27f5783b7211219d441d1c2132789917df42fdc0aba1d5ec51e3d6f7583af9474d59c1f532d8880c8c325ccc96e73b3df py3-virtualenv-16.0.0.tar.gz
-9c68dcda515dfc974433c9a68d81be0b028a7967eebb1b6d1d912c3859c7925fe970f1668ac9e406768de91ed32b27b3b8ea7a4939f8adc7a09e1bf904df10b9 test-python3.6.patch"
+sha512sums="63467cd2e577d0d56b5fb3529d9fb12a64f08f756a5f1310487f0d64da8452c4743872c6b620984e0877e0a98b3080efc6bb8c58cc64c4f120da8e67e91044cc py3-virtualenv-16.7.2.tar.gz
+22f05b9c3d35339a28f50f7a01d81df082a00609712a5c38b92fe5d5c98ea077ad76c7d5a5072968105622d06e40897a34878133a4b5fd895a62d1e0d9a8928e python3-provides.patch
+f5e2a5036c7dfa124b71914981c46955466cb718392a90a4d8536dde4c153eb9cf3a8539c5cf870bb820b6e518c8b781025b825e11924ea4533890fa31e5a951 python3.patch
+a5545b1dd3b0465233b983fd90cdfbd4514350e32a7d312107b9cfa83c8755f961bd483796a48697c9938fd44a60171c4368aa3f4b2760be8d2d8e053f719529 tests.patch"
diff --git a/user/py3-virtualenv/python3-provides.patch b/user/py3-virtualenv/python3-provides.patch
new file mode 100644
index 000000000..b3a7f11fc
--- /dev/null
+++ b/user/py3-virtualenv/python3-provides.patch
@@ -0,0 +1,8 @@
+--- virtualenv-16.7.2/setup.py 2019-07-26 05:13:47.000000000 -0400
++++ virtualenv-16.7.2/setup.py 2019-08-06 10:12:36.010033115 -0400
+@@ -13,4 +13,4 @@ def get_version():
+ raise RuntimeError("Unable to find version string.")
+
+
+-setup(version=get_version(), py_modules=["virtualenv"], setup_requires=["setuptools >= 40.6.3"])
++setup(version=get_version(), py_modules=["virtualenv"], setup_requires=[])
diff --git a/user/py3-virtualenv/python3.patch b/user/py3-virtualenv/python3.patch
new file mode 100644
index 000000000..f1550f49c
--- /dev/null
+++ b/user/py3-virtualenv/python3.patch
@@ -0,0 +1,44 @@
+--- virtualenv-16.7.2/virtualenv.py
++++ virtualenv-16.7.2/virtualenv.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Create a "virtual" Python installation"""
+
+ # fmt: off
+@@ -82,7 +82,7 @@ DEFAULT_CONFIG_FILE = os.path.join(DEFAU
+ if IS_PYPY:
+ EXPECTED_EXE = "pypy"
+ else:
+- EXPECTED_EXE = "python"
++ EXPECTED_EXE = "python3"
+
+ # Return a mapping of version -> Python executable
+ # Only provided for Windows, where the information in the registry is used
+--- virtualenv-16.7.2/tasks/update_embedded.py
++++ virtualenv-16.7.2/tasks/update_embedded.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ Helper script to rebuild virtualenv.py from virtualenv_support
+ """
+--- virtualenv-16.7.2/tests/test_virtualenv.py
++++ virtualenv-16.7.2/tests/test_virtualenv.py
+@@ -288,14 +288,14 @@ def test_resolve_interpreter_with_invali
+ def test_activate_after_future_statements():
+ """Should insert activation line after last future statement"""
+ script = [
+- "#!/usr/bin/env python",
++ "#!/usr/bin/env python3",
+ "from __future__ import with_statement",
+ "from __future__ import print_function",
+ 'print("Hello, world!")',
+ ]
+ out = virtualenv.relative_script(script)
+ assert out == [
+- "#!/usr/bin/env python",
++ "#!/usr/bin/env python3",
+ "from __future__ import with_statement",
+ "from __future__ import print_function",
+ "",
diff --git a/user/py3-virtualenv/test-python3.6.patch b/user/py3-virtualenv/test-python3.6.patch
deleted file mode 100644
index 782aca2c5..000000000
--- a/user/py3-virtualenv/test-python3.6.patch
+++ /dev/null
@@ -1,96 +0,0 @@
---- virtualenv-15.1.0/tests/test_activate_output.expected 2016-11-16 02:39:30.000000000 +0000
-+++ virtualenv-15.1.0/tests/test_activate_output.expected 2018-01-10 23:31:17.840000000 +0000
-@@ -1,2 +1,4 @@
--New python executable in /tmp/test_virtualenv_activate.venv/bin/python
-+Using base prefix '/usr'
-+New python executable in /tmp/test_virtualenv_activate.venv/bin/python3
-+Also creating executable in /tmp/test_virtualenv_activate.venv/bin/python
- Installing setuptools, pip, wheel...done.
---- virtualenv-15.1.0/tests/test_virtualenv.py 2016-11-16 02:39:30.000000000 +0000
-+++ virtualenv-15.1.0/tests/test_virtualenv.py 2018-01-11 03:40:22.270000000 +0000
-@@ -58,13 +58,13 @@
- def test_activate_after_future_statements():
- """Should insert activation line after last future statement"""
- script = [
-- '#!/usr/bin/env python',
-+ '#!/usr/bin/env python3',
- 'from __future__ import with_statement',
- 'from __future__ import print_function',
- 'print("Hello, world!")'
- ]
- assert virtualenv.relative_script(script) == [
-- '#!/usr/bin/env python',
-+ '#!/usr/bin/env python3',
- 'from __future__ import with_statement',
- 'from __future__ import print_function',
- '',
-@@ -110,7 +110,7 @@
- if virtualenv.is_win:
- required_executables = ['python.exe', 'pythonw.exe']
- else:
-- py_exe_no_version = 'python'
-+ py_exe_no_version = 'python3'
- py_exe_version_major = 'python%s' % sys.version_info[0]
- py_exe_version_major_minor = 'python%s.%s' % (
- sys.version_info[0], sys.version_info[1])
---- virtualenv-15.1.0/tests/test_activate.sh 2016-11-16 02:39:30.000000000 +0000
-+++ virtualenv-15.1.0/tests/test_activate.sh 2018-01-11 03:49:05.070000000 +0000
-@@ -19,7 +19,7 @@
- echo "$0: Created virtualenv ${TESTENV}." 1>&2
-
- echo "$0: Activating ${TESTENV}..." 1>&2
--. ${TESTENV}/bin/activate
-+PS1="${PS1:-}" . ${TESTENV}/bin/activate
- echo "$0: Activated ${TESTENV}." 1>&2
-
- echo "$0: Checking value of \$VIRTUAL_ENV..." 1>&2
-@@ -31,14 +31,14 @@
-
- echo "$0: \$VIRTUAL_ENV = \"${VIRTUAL_ENV}\" -- OK." 1>&2
-
--echo "$0: Checking output of \$(which python)..." 1>&2
-+echo "$0: Checking output of \$(which python3)..." 1>&2
-
--if [ "$(which python)" != "${TESTENV}/bin/python" ]; then
-- echo "$0: Expected \$(which python) to return \"${TESTENV}/bin/python\"; actual value: \"$(which python)\"!" 1>&2
-+if [ "$(which python3)" != "${TESTENV}/bin/python3" ]; then
-+ echo "$0: Expected \$(which python3) to return \"${TESTENV}/bin/python3\"; actual value: \"$(which python3)\"!" 1>&2
- exit 3
- fi
-
--echo "$0: Output of \$(which python) is OK." 1>&2
-+echo "$0: Output of \$(which python3) is OK." 1>&2
-
- echo "$0: Checking output of \$(which pip)..." 1>&2
-
-@@ -60,7 +60,7 @@
-
- echo "$0: Executing a simple Python program..." 1>&2
-
--TESTENV=${TESTENV} python <<__END__
-+TESTENV=${TESTENV} python3 <<__END__
- import os, sys
-
- expected_site_packages = os.path.join(os.environ['TESTENV'], 'lib','python%s' % sys.version[:3], 'site-packages')
---- virtualenv-16.0.0/setup.py 2018-05-16 19:36:07.000000000 -0400
-+++ virtualenv-16.0.0/setup.py 2018-10-22 20:56:04.691681656 -0400
-@@ -33,7 +33,7 @@ try:
- },
- 'zip_safe': False,
- 'cmdclass': {'test': PyTest},
-- 'tests_require': ['pytest', 'mock'],
-+ 'tests_require': ['pytest'],
- }
- except ImportError:
- from distutils.core import setup
---- virtualenv-16.0.0/tests/test_virtualenv.py 2018-05-16 19:36:07.000000000 -0400
-+++ virtualenv-16.0.0/tests/test_virtualenv.py 2018-10-22 20:56:38.771682266 -0400
-@@ -7,7 +7,7 @@ import tempfile
- import pytest
- import platform # noqa
-
--from mock import patch, Mock
-+from unittest.mock import patch, Mock
-
-
- def test_version():
diff --git a/user/py3-virtualenv/tests.patch b/user/py3-virtualenv/tests.patch
new file mode 100644
index 000000000..98619b1c1
--- /dev/null
+++ b/user/py3-virtualenv/tests.patch
@@ -0,0 +1,84 @@
+--- virtualenv-16.7.2/tests/test_virtualenv.py
++++ virtualenv-16.7.2/tests/test_virtualenv.py
+@@ -10,9 +10,7 @@ import tempfile
+ import textwrap
+ import zipfile
+
+-import pypiserver
+ import pytest
+-import pytest_localserver.http
+ import six
+
+ import virtualenv
+@@ -346,7 +344,7 @@ def test_install_python_bin():
+ py_exe_no_version = "python"
+ py_exe_version_major = "python%s" % sys.version_info[0]
+ py_exe_version_major_minor = "python{}.{}".format(sys.version_info[0], sys.version_info[1])
+- required_executables = [py_exe_no_version, py_exe_version_major, py_exe_version_major_minor]
++ required_executables = [py_exe_version_major, py_exe_version_major_minor]
+
+ for pth in required_executables:
+ assert os.path.exists(os.path.join(bin_dir, pth)), "%s should exist in bin_dir" % pth
+@@ -489,6 +487,7 @@ def test_create_environment_in_dir_with_
+ virtualenv.create_environment(ve_path)
+
+
++@pytest.mark.skip(reason="pypiserver et al are not packaged")
+ def test_create_environment_with_local_https_pypi(tmpdir):
+ """Create virtual environment using local PyPI listening https with
+ certificate signed with custom certificate authority
+@@ -643,7 +642,7 @@ def test_create_environment_with_old_pip
+ 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, "python3"), "-c", "license()"), stdin=subprocess.PIPE, stdout=subprocess.PIPE
+ )
+ out_b, _ = proc.communicate(b"q\n")
+ out = out_b.decode()
+--- virtualenv-16.7.2/tests/test_zipapp.py
++++ virtualenv-16.7.2/tests/test_zipapp.py
+@@ -55,6 +55,7 @@ def test_zipapp_basic_invocation(call_zi
+ _test_basic_invocation(call_zipapp, tmp_path)
+
+
++@pytest.mark.skip(reason="requires network access")
+ def test_wheel_basic_invocation(call_wheel, tmp_path):
+ _test_basic_invocation(call_wheel, tmp_path)
+
+@@ -91,6 +91,7 @@ def _test_invocation_dash_p(make_env, tm
+ assert_venv_looks_good(venv, [expected], "python{}".format(".exe" if virtualenv.IS_WIN else ""))
+
+
++@pytest.mark.skip(reason="no python2 available")
+ def test_zipapp_invocation_dash_p(call_zipapp, tmp_path):
+ _test_invocation_dash_p(call_zipapp, tmp_path)
+
+@@ -95,6 +95,6 @@ def test_zipapp_invocation_dash_p(call_z
+ _test_invocation_dash_p(call_zipapp, tmp_path)
+
+
+-@pytest.mark.skipif(sys.platform == "win32" and six.PY2, reason="no python 3 for windows on CI")
++@pytest.mark.skip(reason="no python2 available")
+ def test_wheel_invocation_dash_p(call_wheel, tmp_path):
+ _test_invocation_dash_p(call_wheel, tmp_path)
+--- virtualenv-16.7.2/tests/test_from_source.py
++++ virtualenv-16.7.2/tests/test_from_source.py
+@@ -40,6 +40,7 @@ def test_use_from_source_sdist(sdist, tm
+ )
+
+
++@pytest.mark.skip(reason="requires network access")
+ def test_use_from_wheel(tmp_path, extracted_wheel, clean_python, monkeypatch, call_subprocess):
+ """test that we can create a virtual environment by feeding to a clean python the wheels content"""
+ virtualenv_file = extracted_wheel / "virtualenv.py"
+--- virtualenv-16.7.2/tests/test_source_content.py
++++ virtualenv-16.7.2/tests/test_source_content.py
+@@ -41,6 +41,7 @@ def test_sdist_contains(sdist):
+ assert not extra, " | ".join(extra)
+
+
++@pytest.mark.skip(reason="requires network access")
+ def test_wheel_contains(extracted_wheel):
+ content = set(extracted_wheel.iterdir())
+