Jython

From GeilThings

Jump to: navigation, search
Jython
Jython.png
General
Version 2.5.4-rc1
Stable 2.5.4-rc1
Function Programming Language
Scripts
Version Script /opt/jython/jython -V


Contents

General

Installation Jython

NEWVERSION=2.5.2
cd /opt
wget http://downloads.sourceforge.net/project/jython/jython/2.5.2/jython_installer-2.5.2.jar
java -jar jython_installer-${NEWVERSION}.jar --console
 
ln -s /opt/jython/jython /usr/bin/jython

Upgrading Jython

APPNAME=Jython
 
# Check version.
RAWVERSIONSCRIPT=`curl -sd "action=ask&query=[[$APPNAME]]|%3FVersion_Script&format=json" http://www.geilthings.com/api.php` 
DIRTYVERSIONSCRIPT=`echo "$RAWVERSIONSCRIPT" | grep -Po '^.*?\K(?<=Version Script\":\[\").*?(?=\")'`
CLEANVERSIONSCRIPT=$(echo "$DIRTYVERSIONSCRIPT" |  sed -e 's/\\//g')
RAWOLDVERSION=`$CLEANVERSIONSCRIPT 2>&1`
OLDVERSION=${RAWOLDVERSION:7}
echo $OLDVERSION
 
RAWNEWVERSION=`curl -sd "action=ask&query=[[Jython]]|%3FStable&format=json" http://www.geilthings.com/api.php` 
NEWVERSION=`echo "$RAWNEWVERSION" | grep -Po '^.*?\K(?<=Stable\":\[\").*?(?=\")'`  
echo $NEWVERSION
 
mv /opt/jython /opt/old_jython-${OLDVERSION}
 
cd /opt
# Previous to 2.5.3-rc1 the Jython repositories were in SourceForge, now in Maven Central. I never liked Ant, I dislike Maven 100x more. What will be next? Hosting files in FaceBook? Voy a vomitar.
wget http://search.maven.org/remotecontent?filepath=org/python/jython-installer/${NEWVERSION}/jython-installer-${NEWVERSION}.jar
# The downloaded file will have a name like 
# remotecontent?filepath=org%2Fpython%2Fjython%2F2.5.3-rc1%2Fjython-2.5.3-rc1.jar
mv remotecontent?filepath=org%2Fpython%2Fjython-installer%2F${NEWVERSION}%2Fjython-installer-${NEWVERSION}.jar jython-installer-${NEWVERSION}.jar 
 
java -jar jython-installer-${NEWVERSION}.jar --console
# Target directory: /opt/jython
 
# Test.
# ...
 
rm -f /usr/bin/jython
ln -s /opt/jython/jython /usr/bin/jython

Programming with Jython


Versions

Software name Version number Version date
Jython 2.5.4rc1 12 February 2013

Comments

blog comments powered by Disqus