From a942487d002fcbbf8794eaf3353e90a489968c66 Mon Sep 17 00:00:00 2001 From: Oliver Winston Date: Tue, 5 Jun 2007 19:53:05 +0000 Subject: [PATCH] * added pypy (1.0.0) - Python implementation git-svn-id: svn://svn.opensde.net/opensde/package/trunk@21236 10447126-35f2-4685-b0cf-6dd780d3921f --- python/pypy/pypy.conf | 34 ++++++++++++++++++++++++++++ python/pypy/pypy.desc | 35 ++++++++++++++++++++++++++++ python/pypy/pypy.wrapper | 49 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 python/pypy/pypy.conf create mode 100644 python/pypy/pypy.desc create mode 100644 python/pypy/pypy.wrapper diff --git a/python/pypy/pypy.conf b/python/pypy/pypy.conf new file mode 100644 index 000000000..33ab821f0 --- /dev/null +++ b/python/pypy/pypy.conf @@ -0,0 +1,34 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../pypy/pypy.conf +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +pypy_postmake() + { + if [ $prefix_auto = 1 ];then + prefix=opt/pypy + fi + mkdir -pv $root/$prefix + cp -arvf $(pwd)/* $root/$prefix/ + for file in $(ls $root/$prefix/pypy/bin/*.py) + do + chmod 775 $file + done + # install -m 755 $confdir/pypy.wrapper $bindir/pypy + sed "s,{PYPYDIR},$root/$prefix," $confdir/pypy.wrapper>$bindir/pypy + chmod 755 $bindir/pypy + +} +runconf=0 +makeopt='' +makeinstopt='' +hook_add postmake 5 pypy_postmake diff --git a/python/pypy/pypy.desc b/python/pypy/pypy.desc new file mode 100644 index 000000000..8e96970bb --- /dev/null +++ b/python/pypy/pypy.desc @@ -0,0 +1,35 @@ +[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN --- +[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. +[COPY] +[COPY] Filename: package/.../pypy/pypy.desc +[COPY] Copyright (C) 2007 The OpenSDE Project +[COPY] +[COPY] More information can be found in the files COPYING and README. +[COPY] +[COPY] This program is free software; you can redistribute it and/or modify +[COPY] it under the terms of the GNU General Public License as published by +[COPY] the Free Software Foundation; version 2 of the License. A copy of the +[COPY] GNU General Public License can be found in the file COPYING. +[COPY] --- SDE-COPYRIGHT-NOTE-END --- + +[I] Python implementation + +[T] PyPy is python implementation written in python. The guiding idea is to +[T] translate a Python-level description of the Python language itself to +[T] lower level languages. + +[U] http://codespeak.net/pypy/ + +[A] The PyPy project +[M] The OpenSDE Community + +[C] extra/development +[C] extra/toy + +[L] OpenSource + +[S] Beta +[V] 1.0.0 +[P] X -----5---9 800.000 + +[D] 691409776 pypy-1.0.0.tar.bz2 http://codespeak.net/download/pypy/ diff --git a/python/pypy/pypy.wrapper b/python/pypy/pypy.wrapper new file mode 100644 index 000000000..c4c310257 --- /dev/null +++ b/python/pypy/pypy.wrapper @@ -0,0 +1,49 @@ +#!/bin/sh +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../pypy/pypy.wrapper +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +pypy={PYPYDIR} + +help_msg() + { + echo "$0 [command] [options]" + echo "Possible commands:" + cd $pypy/pypy/bin/ + for x in $(ls *.py) + do + if [ -x $x ]; then + echo " $(echo $x | sed 's,\.\w*$,,')" + fi + done + } + +if [ $# -eq 0 ];then + file="py" +else + file=$1 +fi + +case "$1" in + -*) help_msg;exit 1;; + --*) hlp_msg;exit 1;; +esac + +if [ ! -x $pypy/pypy/bin/$file.py ];then + echo "Error: command $file is not executable." + help_msg + exit 1 +fi +shift +exec "$pypy/pypy/bin/$file.py" "$@" +