From f623231734666ab7d1f01c68e01baa93370cc6db Mon Sep 17 00:00:00 2001 From: Josh Friend Date: Sun, 3 May 2015 22:24:36 -0400 Subject: [PATCH 1/2] Add jython 2.7.0 --- plugins/python-build/share/python-build/jython-2.7-beta1 | 5 ----- plugins/python-build/share/python-build/jython-2.7-beta2 | 5 ----- plugins/python-build/share/python-build/jython-2.7-beta3 | 5 ----- plugins/python-build/share/python-build/jython-2.7-beta4 | 5 ----- plugins/python-build/share/python-build/jython-2.7.0 | 3 +++ 5 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 plugins/python-build/share/python-build/jython-2.7-beta1 delete mode 100644 plugins/python-build/share/python-build/jython-2.7-beta2 delete mode 100644 plugins/python-build/share/python-build/jython-2.7-beta3 delete mode 100644 plugins/python-build/share/python-build/jython-2.7-beta4 create mode 100644 plugins/python-build/share/python-build/jython-2.7.0 diff --git a/plugins/python-build/share/python-build/jython-2.7-beta1 b/plugins/python-build/share/python-build/jython-2.7-beta1 deleted file mode 100644 index e4f83c6e..00000000 --- a/plugins/python-build/share/python-build/jython-2.7-beta1 +++ /dev/null @@ -1,5 +0,0 @@ -require_java -install_jar "jython-2.7-beta1" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b1/jython-installer-2.7-b1.jar" jython ez_setup -# pip (>= 1.3) does not work properly since it uses HTTPS for downloads -# * https://github.com/yyuu/pyenv/issues/15 -install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#12a9302acfca62cdc7bc5d83386cac3e0581db61ac39acdb3a4e766a16b88eb1" python diff --git a/plugins/python-build/share/python-build/jython-2.7-beta2 b/plugins/python-build/share/python-build/jython-2.7-beta2 deleted file mode 100644 index 5a18fce1..00000000 --- a/plugins/python-build/share/python-build/jython-2.7-beta2 +++ /dev/null @@ -1,5 +0,0 @@ -require_java -install_jar "jython-2.7-beta2" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b2/jython-installer-2.7-b2.jar" jython ez_setup -# pip (>= 1.3) does not work properly since it uses HTTPS for downloads -# * https://github.com/yyuu/pyenv/issues/15 -install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#12a9302acfca62cdc7bc5d83386cac3e0581db61ac39acdb3a4e766a16b88eb1" python diff --git a/plugins/python-build/share/python-build/jython-2.7-beta3 b/plugins/python-build/share/python-build/jython-2.7-beta3 deleted file mode 100644 index 4f555e80..00000000 --- a/plugins/python-build/share/python-build/jython-2.7-beta3 +++ /dev/null @@ -1,5 +0,0 @@ -require_java -install_jar "jython-2.7-beta3" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b3/jython-installer-2.7-b3.jar" jython ez_setup -# pip (>= 1.3) does not work properly since it uses HTTPS for downloads -# * https://github.com/yyuu/pyenv/issues/15 -install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#12a9302acfca62cdc7bc5d83386cac3e0581db61ac39acdb3a4e766a16b88eb1" python diff --git a/plugins/python-build/share/python-build/jython-2.7-beta4 b/plugins/python-build/share/python-build/jython-2.7-beta4 deleted file mode 100644 index fccac383..00000000 --- a/plugins/python-build/share/python-build/jython-2.7-beta4 +++ /dev/null @@ -1,5 +0,0 @@ -require_java -install_jar "jython-2.7-beta4" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b4/jython-installer-2.7-b4.jar" jython ez_setup -# pip (>= 1.3) does not work properly since it uses HTTPS for downloads -# * https://github.com/yyuu/pyenv/issues/15 -install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#12a9302acfca62cdc7bc5d83386cac3e0581db61ac39acdb3a4e766a16b88eb1" python diff --git a/plugins/python-build/share/python-build/jython-2.7.0 b/plugins/python-build/share/python-build/jython-2.7.0 new file mode 100644 index 00000000..a294a1c7 --- /dev/null +++ b/plugins/python-build/share/python-build/jython-2.7.0 @@ -0,0 +1,3 @@ +require_java +install_jar "jython-2.7.0" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar#b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf" jython ez_setup +install_package "pip-6.1.1" "https://pypi.python.org/packages/source/p/pip/pip-6.1.1.tar.gz#89f3b626d225e08e7f20d85044afa40f612eb3284484169813dc2d0631f2a556" python From 7b8bd11416a5557b80ec3ae00a20db253c26cfdb Mon Sep 17 00:00:00 2001 From: Josh Friend Date: Mon, 4 May 2015 00:25:44 -0400 Subject: [PATCH 2/2] fix jython pip and add warning about JAVA_HOME for osx/windows users --- .../share/python-build/jython-2.7.0 | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/plugins/python-build/share/python-build/jython-2.7.0 b/plugins/python-build/share/python-build/jython-2.7.0 index a294a1c7..6fa20ecb 100644 --- a/plugins/python-build/share/python-build/jython-2.7.0 +++ b/plugins/python-build/share/python-build/jython-2.7.0 @@ -1,3 +1,22 @@ require_java -install_jar "jython-2.7.0" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar#b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf" jython ez_setup -install_package "pip-6.1.1" "https://pypi.python.org/packages/source/p/pip/pip-6.1.1.tar.gz#89f3b626d225e08e7f20d85044afa40f612eb3284484169813dc2d0631f2a556" python +install_jar "jython-2.7.0" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar#b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf" jython + +# Jython is supposed to install pip using ensurepip by default, but this does +# not appear to be working so we do it manually. +# +# pyenv's `ensurepip` downloads `get-pip.py` which isnt currently compatible +# with jython: http://bugs.jython.org/issue2302 +# +# Use the ensurepip module in jython to install the bundled pip instead: +"$PYTHON_BIN" -m ensurepip + +case "$(pypy_architecture 2>/dev/null || true)" in +"osx64"|"win32" ) + # Jython does not seem to work properly on OSX/windows unless JAVA_HOME is set + if [ -z "${JAVA_HOME+defined}" ]; then + colorize 1 "WARNING: " + echo "Please ensure that your JAVA_HOME environment variable is set correctly!" + echo "See http://bugs.jython.org/issue2346 for details." + fi + ;; +esac