Created
July 5, 2012 23:44
-
-
Save davidjb/3057156 to your computer and use it in GitHub Desktop.
Buildout for JPype (for Plone)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Notes about JPype | |
#------------------------------------ | |
#You need to install default-jre / openjdk-6-jre (Debian/Ubuntu), or | |
#java-1.6.0-openjdk (RHEL/CentOS) *and* associated development packages. | |
#The JAVA_HOME variable should be | |
#set as an environmental variable prior to using the following. | |
#You might want to use the following to set this: | |
#Ubuntu: export JAVA_HOME="/usr/lib/jvm/java-6-openjdk" | |
#RHEL: export JAVA_HOME="/etc/alternatives/java_sdk" | |
#and include these in your profile (eg ~/.bash_profile) to load them on | |
#startup. | |
[buildout] | |
parts += | |
jpype | |
#Hunt down where Java is living on this platform. We take the first available | |
#path and use it. | |
[scripty] | |
recipe = mr.scripty | |
JAVA_PATHS = | |
/usr/lib/jvm/java-6-openjdk-amd64 | |
/usr/lib/jvm/java-6-openjdk | |
/etc/alternatives/java_sdk | |
${buildout:directory} | |
java = | |
... import os | |
... paths = self.JAVA_PATHS.split('\n') | |
... exists = [os.path.exists(path + '/include/jni.h') for path in paths] | |
... return paths[exists.index(True)] | |
[java-env] | |
JAVA_HOME = ${scripty:java} | |
[jpype] | |
recipe = zc.recipe.egg:custom | |
egg = JPype | |
find-links = | |
http://aarnet.dl.sourceforge.net/project/jpype/JPype/0.5.4/JPype-0.5.4.2.zip | |
environment = java-env | |
#Plone configuration | |
#------------------- | |
#Note that you may need to copy and reproduce the following environment vars | |
#and possibly eggs. | |
[instance1] | |
eggs += | |
${jpype:egg} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment