summaryrefslogtreecommitdiff
path: root/user/py3-virtualenv
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2018-04-17 02:41:35 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2018-04-17 02:41:35 +0000
commit43b60beb3683582dba2610095c5c0d9fe103ec4c (patch)
treeee2d0852258898f90b9033fc54161c3f90fd8e7d /user/py3-virtualenv
parent8e41995ddbb56175eb00995ab0f7f750e5bde2da (diff)
parent4f4582578d04b74931148cf5a3e4cc6653188bc6 (diff)
downloadpackages-43b60beb3683582dba2610095c5c0d9fe103ec4c.tar.gz
packages-43b60beb3683582dba2610095c5c0d9fe103ec4c.tar.bz2
packages-43b60beb3683582dba2610095c5c0d9fe103ec4c.tar.xz
packages-43b60beb3683582dba2610095c5c0d9fe103ec4c.zip
Merge branch 'meta/tox' into 'master'
Basic python3 testing packages ``` Includes: * user/py3-tox * user/py3-setuptools * user/py3-pluggy * user/py3-virtualenv * user/py3-pytest ** user/py3-py Most of these packages use tox itself for tests, so !check until we have a copy of tox on the mirrors with which to bootstrap. ``` See merge request !16
Diffstat (limited to 'user/py3-virtualenv')
-rw-r--r--user/py3-virtualenv/APKBUILD37
-rw-r--r--user/py3-virtualenv/test-python3.patch74
2 files changed, 111 insertions, 0 deletions
diff --git a/user/py3-virtualenv/APKBUILD b/user/py3-virtualenv/APKBUILD
new file mode 100644
index 000000000..8a4dde3e1
--- /dev/null
+++ b/user/py3-virtualenv/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Max Rees <maxcrees@me.com>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=py3-virtualenv
+_pkgname=virtualenv
+pkgver=15.1.0
+pkgrel=0
+pkgdesc="Virtual Python Environment builder"
+url="https://pypi.python.org/pypi/virtualenv"
+arch="noarch"
+license="MIT"
+depends="python3"
+makedepends="python3-dev"
+checkdepends="py3-pytest py3-setuptools"
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
+ test-python3.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
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="d7e95b8c017ec076210f30b6fd4bb44be2f7dc0257492c25bb00fee597d3ade34226d03539180f1edaf2d27b361f8efdabb92d3476e13785b890878ee1295cb2 py3-virtualenv-15.1.0.tar.gz
+8e022416eb10289fd5215f3810203eefb450ce2fca7bdc581b5cd1892f41f34815beec35fc6c744991536c1f2edebd58ab934a4414c6fe2ae6387aea02787ef8 test-python3.patch"
diff --git a/user/py3-virtualenv/test-python3.patch b/user/py3-virtualenv/test-python3.patch
new file mode 100644
index 000000000..8b4a99b51
--- /dev/null
+++ b/user/py3-virtualenv/test-python3.patch
@@ -0,0 +1,74 @@
+--- 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')