From 69acbb3fc1e13b86d6dcbf1b26d895e0340ca7a9 Mon Sep 17 00:00:00 2001 From: Max Rees Date: Mon, 22 Oct 2018 21:02:23 -0400 Subject: user/py3-virtualenv: options=net because virtualenvs are stupid --- user/py3-virtualenv/APKBUILD | 7 ++- user/py3-virtualenv/test-python3.6.patch | 96 ++++++++++++++++++++++++++++++++ user/py3-virtualenv/test-python3.patch | 74 ------------------------ 3 files changed, 100 insertions(+), 77 deletions(-) create mode 100644 user/py3-virtualenv/test-python3.6.patch delete mode 100644 user/py3-virtualenv/test-python3.patch (limited to 'user') diff --git a/user/py3-virtualenv/APKBUILD b/user/py3-virtualenv/APKBUILD index 3b699448c..d78f6e7e7 100644 --- a/user/py3-virtualenv/APKBUILD +++ b/user/py3-virtualenv/APKBUILD @@ -7,12 +7,13 @@ pkgrel=0 pkgdesc="Virtual Python Environment builder" url="https://pypi.org/project/virtualenv" arch="noarch" +options="net" license="MIT" depends="python3" makedepends="python3-dev" checkdepends="py3-pytest cmd:which" -source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz - test-python3.patch" +source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/v/$_pkgname/$_pkgname-$pkgver.tar.gz + test-python3.6.patch" builddir="$srcdir/$_pkgname-$pkgver" build() { @@ -34,4 +35,4 @@ package() { } sha512sums="43bc37f1da1b65e9a2df5a8813a801f27f5783b7211219d441d1c2132789917df42fdc0aba1d5ec51e3d6f7583af9474d59c1f532d8880c8c325ccc96e73b3df py3-virtualenv-16.0.0.tar.gz -8e022416eb10289fd5215f3810203eefb450ce2fca7bdc581b5cd1892f41f34815beec35fc6c744991536c1f2edebd58ab934a4414c6fe2ae6387aea02787ef8 test-python3.patch" +9c68dcda515dfc974433c9a68d81be0b028a7967eebb1b6d1d912c3859c7925fe970f1668ac9e406768de91ed32b27b3b8ea7a4939f8adc7a09e1bf904df10b9 test-python3.6.patch" diff --git a/user/py3-virtualenv/test-python3.6.patch b/user/py3-virtualenv/test-python3.6.patch new file mode 100644 index 000000000..782aca2c5 --- /dev/null +++ b/user/py3-virtualenv/test-python3.6.patch @@ -0,0 +1,96 @@ +--- 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/test-python3.patch b/user/py3-virtualenv/test-python3.patch deleted file mode 100644 index 8b4a99b51..000000000 --- a/user/py3-virtualenv/test-python3.patch +++ /dev/null @@ -1,74 +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') -- cgit v1.2.3-70-g09d2