aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannis Leidel2009-10-17 16:06:17 +0200
committerMax Howell2009-10-19 04:02:49 +0100
commit227ad36a5faed27ab6d90a5a5fac8fce68bc612b (patch)
tree665c5e0f2871c73e480d4d94bc7fb35a8c4898e5
parentbf69c89577bb89866342b98b418fa0164069ab63 (diff)
downloadhomebrew-227ad36a5faed27ab6d90a5a5fac8fce68bc612b.tar.bz2
Jython formula
Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.
-rw-r--r--Library/Formula/jython.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/jython.rb b/Library/Formula/jython.rb
new file mode 100644
index 000000000..e3844002f
--- /dev/null
+++ b/Library/Formula/jython.rb
@@ -0,0 +1,22 @@
+require 'formula'
+
+# even though "file -b" reports this as a zip archive, it's just a binary
+class JythonHttpDownloadStrategy <CurlDownloadStrategy
+ def stage
+ FileUtils.mv @dl, File.basename(@url)
+ end
+end
+
+class Jython <Formula
+ url 'http://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar'
+ homepage 'http://www.jython.org'
+ md5 '2ee978eff4306b23753b3fe9d7af5b37'
+
+ def download_strategy
+ JythonHttpDownloadStrategy
+ end
+
+ def install
+ system "java", "-jar", "jython_installer-2.5.1.jar", "-s", "-d", prefix
+ end
+end