From 866dcd408e5ccbb3708404f4916e12dcce6cc878 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 25 Sep 2016 17:25:55 -0500 Subject: [PATCH 01/11] Add build_package_pyston() to python-build --- plugins/python-build/bin/python-build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 43fd0be7..279b23af 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -918,6 +918,15 @@ build_package_jython_builder() { ( cd "dist" && build_package_jython ) } +build_package_pyston() { + mkdir -p "${PREFIX_PATH}/" + cp -fR . "${PREFIX_PATH}/" + chmod +x "${PREFIX_PATH}/"pyston + # FIXME ugly hack below adapted from + # https://github.com/dropbox/pyston/blob/master/docker/pyston/Dockerfile + ( cd "${PREFIX_PATH}/" && ./pyston virtualenv/virtualenv.py . ) +} + build_package_ironpython() { mkdir -p "${PREFIX_PATH}/bin" cp -fR . "${PREFIX_PATH}/bin" From e03cb557b067da2b223ea0336135addb085ee02e Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 25 Sep 2016 17:27:36 -0500 Subject: [PATCH 02/11] Add pyston-0.5.1 --- .../share/python-build/pyston-0.5.1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/python-build/share/python-build/pyston-0.5.1 diff --git a/plugins/python-build/share/python-build/pyston-0.5.1 b/plugins/python-build/share/python-build/pyston-0.5.1 new file mode 100644 index 00000000..850b2dcb --- /dev/null +++ b/plugins/python-build/share/python-build/pyston-0.5.1 @@ -0,0 +1,19 @@ +case "$(pypy_architecture 2>/dev/null || true)" in +"linux64" ) + install_package "pyston-0.5.1-linux64" "https://github.com/dropbox/pyston/releases/download/v0.5.1/pyston-0.5.1-linux64.tar.gz#4b0d2ad2c19f6393b79adbb9312649d38cb8cb3daf0c8fdf8631465c7761bb79" "pyston" verify_py27 + # disabling ensurepip avoids having installation aborted because of a coredump + # pyston targets python 2.7.7 and does not have ensurepip, when attempting to + # run https://bootstrap.pypa.io/get-pip.py it dumps core, see + # https://github.com/dropbox/pyston/issues/1373 + # FIXME: more ugly hacks because Olenna Tyrell would approve + ( cd "${PREFIX_PATH}/bin" && ./pip install https://github.com/dropbox/pyston/releases/download/v0.5.1/Cython-0.24-pyston.tar.gz && ./pip install git+git://github.com/numpy/numpy@v1.11.0 ) + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": A Pyston 0.5.1 binary is not available for $(pypy_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac From 800488bbc151e1b56589e3bb9d1f7fbeddd46a60 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 25 Sep 2016 17:31:56 -0500 Subject: [PATCH 03/11] Add pyston-0.5.1-numpy shim --- plugins/python-build/share/python-build/pyston-0.5.1-numpy | 1 + 1 file changed, 1 insertion(+) create mode 100644 plugins/python-build/share/python-build/pyston-0.5.1-numpy diff --git a/plugins/python-build/share/python-build/pyston-0.5.1-numpy b/plugins/python-build/share/python-build/pyston-0.5.1-numpy new file mode 100644 index 00000000..6e7526b0 --- /dev/null +++ b/plugins/python-build/share/python-build/pyston-0.5.1-numpy @@ -0,0 +1 @@ +source "${BASH_SOURCE%/*}/pyston-0.5.1" From 8acb4ebaba1010112fd6b48c3c2311894b98ffc9 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Mon, 26 Sep 2016 19:46:29 -0500 Subject: [PATCH 04/11] Delete pyston-0.5.1-numpy --- plugins/python-build/share/python-build/pyston-0.5.1-numpy | 1 - 1 file changed, 1 deletion(-) delete mode 100644 plugins/python-build/share/python-build/pyston-0.5.1-numpy diff --git a/plugins/python-build/share/python-build/pyston-0.5.1-numpy b/plugins/python-build/share/python-build/pyston-0.5.1-numpy deleted file mode 100644 index 6e7526b0..00000000 --- a/plugins/python-build/share/python-build/pyston-0.5.1-numpy +++ /dev/null @@ -1 +0,0 @@ -source "${BASH_SOURCE%/*}/pyston-0.5.1" From d24ce2494bc4d2890368b9f15c9d5531e61dcb31 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Mon, 26 Sep 2016 20:28:46 -0500 Subject: [PATCH 05/11] Added pyston_architecture() alias to python-build --- plugins/python-build/bin/python-build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 279b23af..f7e89322 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -964,6 +964,10 @@ pypy_architecture() { esac } +pyston_architecture() { + pypy_architecture +} + build_package_pypy() { build_package_copy mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib" From 4e4bd420202bcc16da696002171fafd007dae28f Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Mon, 26 Sep 2016 20:31:01 -0500 Subject: [PATCH 06/11] Changed pypy_architecture reference to pyston alias --- plugins/python-build/share/python-build/pyston-0.5.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/python-build/share/python-build/pyston-0.5.1 b/plugins/python-build/share/python-build/pyston-0.5.1 index 850b2dcb..542ae688 100644 --- a/plugins/python-build/share/python-build/pyston-0.5.1 +++ b/plugins/python-build/share/python-build/pyston-0.5.1 @@ -1,4 +1,4 @@ -case "$(pypy_architecture 2>/dev/null || true)" in +case "$(pyston_architecture 2>/dev/null || true)" in "linux64" ) install_package "pyston-0.5.1-linux64" "https://github.com/dropbox/pyston/releases/download/v0.5.1/pyston-0.5.1-linux64.tar.gz#4b0d2ad2c19f6393b79adbb9312649d38cb8cb3daf0c8fdf8631465c7761bb79" "pyston" verify_py27 # disabling ensurepip avoids having installation aborted because of a coredump From 7a957c54889da314a50ae8e970246f80e5386e60 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Mon, 26 Sep 2016 21:16:52 -0500 Subject: [PATCH 07/11] Fix missing reference to pypy_architecture --- plugins/python-build/share/python-build/pyston-0.5.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/python-build/share/python-build/pyston-0.5.1 b/plugins/python-build/share/python-build/pyston-0.5.1 index 542ae688..8f241f87 100644 --- a/plugins/python-build/share/python-build/pyston-0.5.1 +++ b/plugins/python-build/share/python-build/pyston-0.5.1 @@ -11,7 +11,7 @@ case "$(pyston_architecture 2>/dev/null || true)" in * ) { echo colorize 1 "ERROR" - echo ": A Pyston 0.5.1 binary is not available for $(pypy_architecture 2>/dev/null || true)." + echo ": A Pyston 0.5.1 binary is not available for $(pyston_architecture 2>/dev/null || true)." echo } >&2 exit 1 From b662634abf891311a09226999f6f2412c2344fdc Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 2 Oct 2016 10:07:50 -0500 Subject: [PATCH 08/11] Move virtualenv hack into pyston-0.5.1 --- plugins/python-build/bin/python-build | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index f7e89322..5c01dbf8 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -922,9 +922,6 @@ build_package_pyston() { mkdir -p "${PREFIX_PATH}/" cp -fR . "${PREFIX_PATH}/" chmod +x "${PREFIX_PATH}/"pyston - # FIXME ugly hack below adapted from - # https://github.com/dropbox/pyston/blob/master/docker/pyston/Dockerfile - ( cd "${PREFIX_PATH}/" && ./pyston virtualenv/virtualenv.py . ) } build_package_ironpython() { From 858b3187798f2027fcecec000321a49cfb2d4187 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 2 Oct 2016 10:24:26 -0500 Subject: [PATCH 09/11] Add workaround hacks into pyston-0.5.1 --- plugins/python-build/share/python-build/pyston-0.5.1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/python-build/share/python-build/pyston-0.5.1 b/plugins/python-build/share/python-build/pyston-0.5.1 index 8f241f87..28d97a8a 100644 --- a/plugins/python-build/share/python-build/pyston-0.5.1 +++ b/plugins/python-build/share/python-build/pyston-0.5.1 @@ -5,8 +5,15 @@ case "$(pyston_architecture 2>/dev/null || true)" in # pyston targets python 2.7.7 and does not have ensurepip, when attempting to # run https://bootstrap.pypa.io/get-pip.py it dumps core, see # https://github.com/dropbox/pyston/issues/1373 - # FIXME: more ugly hacks because Olenna Tyrell would approve + # FIXME ugly hack below adapted from + # https://github.com/dropbox/pyston/blob/master/docker/pyston/Dockerfile + ( cd "${PREFIX_PATH}/" && ./pyston virtualenv/virtualenv.py . ) + # activate the virtualenv so that we're using the correct pip and site-packages location + ( source "${PREFIX_PATH}/bin/activate" ) + # FIXME: if this fails it should not break the installation ( cd "${PREFIX_PATH}/bin" && ./pip install https://github.com/dropbox/pyston/releases/download/v0.5.1/Cython-0.24-pyston.tar.gz && ./pip install git+git://github.com/numpy/numpy@v1.11.0 ) + # deactivate the virtualenv + ( deactivate ) ;; * ) { echo From 46bc0b7558c365455863b8f6ab22f611952ad336 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 2 Oct 2016 11:38:50 -0500 Subject: [PATCH 10/11] Moved this too soon, verify_python() expects bin/python to be created first --- plugins/python-build/bin/python-build | 3 +++ plugins/python-build/share/python-build/pyston-0.5.1 | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 5c01dbf8..f7e89322 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -922,6 +922,9 @@ build_package_pyston() { mkdir -p "${PREFIX_PATH}/" cp -fR . "${PREFIX_PATH}/" chmod +x "${PREFIX_PATH}/"pyston + # FIXME ugly hack below adapted from + # https://github.com/dropbox/pyston/blob/master/docker/pyston/Dockerfile + ( cd "${PREFIX_PATH}/" && ./pyston virtualenv/virtualenv.py . ) } build_package_ironpython() { diff --git a/plugins/python-build/share/python-build/pyston-0.5.1 b/plugins/python-build/share/python-build/pyston-0.5.1 index 28d97a8a..3bac8557 100644 --- a/plugins/python-build/share/python-build/pyston-0.5.1 +++ b/plugins/python-build/share/python-build/pyston-0.5.1 @@ -5,9 +5,6 @@ case "$(pyston_architecture 2>/dev/null || true)" in # pyston targets python 2.7.7 and does not have ensurepip, when attempting to # run https://bootstrap.pypa.io/get-pip.py it dumps core, see # https://github.com/dropbox/pyston/issues/1373 - # FIXME ugly hack below adapted from - # https://github.com/dropbox/pyston/blob/master/docker/pyston/Dockerfile - ( cd "${PREFIX_PATH}/" && ./pyston virtualenv/virtualenv.py . ) # activate the virtualenv so that we're using the correct pip and site-packages location ( source "${PREFIX_PATH}/bin/activate" ) # FIXME: if this fails it should not break the installation From 4336d8b43aba223da3d71fc76202b4645f5fa670 Mon Sep 17 00:00:00 2001 From: Samuel Villamonte Date: Sun, 2 Oct 2016 11:57:06 -0500 Subject: [PATCH 11/11] Drop numpy install for now --- plugins/python-build/share/python-build/pyston-0.5.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/python-build/share/python-build/pyston-0.5.1 b/plugins/python-build/share/python-build/pyston-0.5.1 index 3bac8557..cdb6b77e 100644 --- a/plugins/python-build/share/python-build/pyston-0.5.1 +++ b/plugins/python-build/share/python-build/pyston-0.5.1 @@ -6,11 +6,11 @@ case "$(pyston_architecture 2>/dev/null || true)" in # run https://bootstrap.pypa.io/get-pip.py it dumps core, see # https://github.com/dropbox/pyston/issues/1373 # activate the virtualenv so that we're using the correct pip and site-packages location - ( source "${PREFIX_PATH}/bin/activate" ) + # ( source "${PREFIX_PATH}/bin/activate" ) # FIXME: if this fails it should not break the installation - ( cd "${PREFIX_PATH}/bin" && ./pip install https://github.com/dropbox/pyston/releases/download/v0.5.1/Cython-0.24-pyston.tar.gz && ./pip install git+git://github.com/numpy/numpy@v1.11.0 ) + # ( cd "${PREFIX_PATH}/bin" && ./pip install https://github.com/dropbox/pyston/releases/download/v0.5.1/Cython-0.24-pyston.tar.gz && ./pip install git+git://github.com/numpy/numpy@v1.11.0 ) # deactivate the virtualenv - ( deactivate ) + # ( deactivate ) ;; * ) { echo