-
Notifications
You must be signed in to change notification settings - Fork 22
Home
ZipPy is a work in progress Python 3 implementation as one of the Truffle languages. It currently borrows the same project setup as FastR, in which the guest language code is managed in its own repository splitting ZipPy and Graal in two different repositories. This arrangement is made possible by mx
.
ZipPy is developed and tested on Mac OS X (10.11/10.10) and Linux Ubuntu 14.04.
Building on Windows is currently not supported.
- Install the most recent JDK 8 and store its path on
$JAVA_HOME
.
$ export JAVA_HOME=/path/to/jdk
- Create a new directory. We will refer to this as
$ZIPPY_HOME
in what follows.
ZipPy requires Truffle and both projects are hosted in different repositories.
$ZIPPY_HOME
will serve as a root directory for both projcets.
```sh
$ mkdir zippy_project
$ cd zippy_project
$ export ZIPPY_HOME=$PWD
```
- Install
mx
build tool and append it to yourPATH
:
mx
build tool, which is used in all projects built around Graal.mx
requires Python 2.7 (not exactly ZipPy at this point...).
```sh
$ git clone https://github.com/graalvm/mx.git
$ export PATH=$ZIPPY_HOME/mx:$PATH
```
Its strongly recommended to add
mx
to your shell config file e.g..bashrc
for bash.$ echo "export PATH=$ZIPPY_HOME/mx:$PATH" >> ~/.bashrcFor more information about
mx
please refer to the mx.
-
Clone
ZipPy
:$ git clone https://github.com/securesystemslab/zippy.git
-
Add environment variables to
zippy/mx.zippy/env
:$ echo "JAVA_HOME=$JAVA_HOME" > $ZIPPY_HOME/zippy/mx.zippy/env $ echo "DEFAULT_VM=server" >> $ZIPPY_HOME/zippy/mx.zippy/env
-
Pull the required projects:
$ cd $ZIPPY_HOME/zippy $ mx spull
Now you should have
zippy
andtruffle
under the project root$ZIPPY_HOME
. If everything looks good at this point, you should be able to move on to the building step.
To build a suite and the suites it depends on, the mx build
command is used:
$ cd $ZIPPY_HOME/zippy
$ mx spull
$ mx build
The first build will also download various required libraries, so there must be a network connection.
If your starting point is an existing checkout of ZipPy, please refer to the following steps.
- Make sure that you have
mx
installed (refer to the section above to installed it) and updatedcd $MX_HOME; git pull
.
This is necessary because
mx
's default suite model is sibling model, which means that imported suites are placed with the primary suite under the same directory ($ZIPPY_HOME
). It is better to keep the entire project in its own directory ($ZIPPY_HOME
).
- Update imported suites:
$ cd $ZIPPY_HOME/zippy
$ mx spull
After building, running ZipPy can be done with mx python
.
$ mx python <file.py>
Sadly, interactive shell and many of the CPython command line options are not yet implemented...
The subproject edu.uci.python.test
includes a set of tests that we currently use. The mx junit
command runs all JUnit test it can find in the current suite.
$ mx junit
Alternatively, you can run
$ mx gate --tags pythontest
Benchmarks are located in zippy/benchmark
. One can use the mx python
command to run each benchmark separately.
Standard JVM | Graal JVM | |
---|---|---|
Linux Ubuntu 14.04.4 | ||
Mac OSX 10.11 |
Yes we need help to push the completeness of ZipPy!
No lawyer BS. Simply raise an issue or submit a pull request when you feel like to.
Wei Zhang, Facebook, Inc.
Mohaned Qunaibit, University of California Irvine