# HG changeset patch # User Paul Boddie # Date 1263170518 -3600 # Node ID bb744d9b1d0146aa90c2fbd141bb555cd6fba206 New-style packaging for Shed Skin. diff -r 000000000000 -r bb744d9b1d01 debian/changelog --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/changelog Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,31 @@ +shedskin (0.3) lenny; urgency=low + + * Support for 3 new standard library modules (now about 20 + in total): + - itertools (jeremie roquet) + - heapq (jeremie roquet) + - csv (converted using shedskin) + * 4 new example programs (now 44 in total!): + - maximum weighted matching algorithm (joris van + rantwijk) + - kanoodle: knuth's dancing links (david austin) + - bidirectional dijkstra algorithm (from networkx) + - barnes-hut force calculation + * Improved type inference (scalability, bugfixes, major + cleanup) + * Support for 'map', 'filter', 'reduce' and 'next' + * Support for 'with' statement (jeremie roquet) + * Support for 'key' argument of 'sorted' (and 'list.sort') + * Reorganized codebase, distutils setup.py (thomas spura) + * Optimized list indexing (joris van rantwijk) + * Optimized addition of 1-length lists and strings + * Improved forward referencing of variables/functions + * Avoid GCC warnings for 'shedskin -e' + * Support for passing keyword arguments to extension module + * Optimized list slicing + * Ignore blocks surrounded by #{ and #} (mike schrick) + * Add --makefile option (mike schrick) + * Several cleanups, removing about 100 lines again + * Large amount of bugfixes + + -- Paul Boddie Mon, 11 Jan 2010 01:36:57 +0100 diff -r 000000000000 -r bb744d9b1d01 debian/compat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/compat Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,1 @@ +5 diff -r 000000000000 -r bb744d9b1d01 debian/control --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/control Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,14 @@ +Source: shedskin +Section: python +Priority: optional +Maintainer: Paul Boddie +Build-Depends: debhelper (>= 5.0.38), python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6) +XS-Python-Version: all +Standards-Version: 3.7.2.1 + +Package: shedskin +Architecture: all +Depends: ${python:Depends}, libgc-dev (>= 6.8), libpcre3-dev (>= 7.4) +Suggests: g++ +XB-Python-Version: ${python:Versions} +Description: Shed Skin is an experimental Python-to-C++ compiler designed to speed up the execution of Python programs. It converts programs written in a static subset of Python to C++. The C++ code can be compiled to executable code, which can be run either as a standalone program or as a module imported from Python. diff -r 000000000000 -r bb744d9b1d01 debian/copyright --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/copyright Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,44 @@ +Package creator: + + Paul Boddie + +The origin of the package is: + + http://shedskin.googlecode.com + +Package author: + + Mark Dufour + +Copyright: + +This package is comprised of two parts: + + - the Shed Skin compiler, plus testing framework (*.py) + - a C++ implementation of the Python builtins and libraries (*.?pp) + +Concerning the Shed Skin compiler, plus testing framework (*.py): + +Copyright 2005-2007 Mark Dufour; License GNU GPL version 3 or later + +Concerning the C++ implementation of Python builtins and libraries (*.?pp): + +Copyright (c) 2005, 2006 M. Dufour + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff -r 000000000000 -r bb744d9b1d01 debian/docs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/docs Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,8 @@ +doc/README.html +doc/README.rst +doc/shedskin.rst +doc/voidspace.css +doc/LICENSE +testdata +debian/test.py +unit.py diff -r 000000000000 -r bb744d9b1d01 debian/rules --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/rules Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,67 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PYVERS=$(shell pyversions -vr) + +build: build-stamp + +build-stamp: $(PYVERS:%=build-python%) + touch $@ + +build-python%: + python$* setup.py build_py + touch $@ + +build-python-scripts: + python setup.py build_scripts + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f *-stamp + rm -rf build + find . -name '*.py[co]' | xargs rm -f + dh_clean + +install: build install-prereq $(PYVERS:%=install-python%) install-python-scripts + # Script fixing would appear here. + +install-prereq: + dh_testdir + dh_testroot + dh_clean -k + +install-python%: + python$* setup.py install_lib --install-dir $(CURDIR)/debian/shedskin/usr/lib/python$*/site-packages + +install-python-scripts: + python setup.py install_scripts --install-dir $(CURDIR)/debian/shedskin/usr/bin + +# Build architecture-independent files here. + +binary-indep: install + dh_testdir -i + dh_testroot -i + # Install before dh_pycentral so that it can work out that there's Python involved + dh_install -i -n + dh_pycentral -i usr/lib/shedskin/bin + dh_installdocs -i + dh_installchangelogs -i + gzip --best debian/shedskin.1 + dh_installman -i debian/shedskin.1.gz + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. + +binary-arch: + # Empty rule for this package. + +binary: binary-indep binary-arch +.PHONY: build clean binary-arch binary-indep binary install diff -r 000000000000 -r bb744d9b1d01 debian/scripts/shedskin --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/scripts/shedskin Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,4 @@ +#!/bin/sh + +export SHEDSKIN_ROOT=/usr/lib/shedskin +/usr/lib/shedskin/bin/ss.py $* diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.1 Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,69 @@ + +.\" Man page generated from reStructeredText. +.TH Shedskin 1 "2009-07-15" "0.2" "" +.SH NAME +Shedskin \- An experimental (restricted) Python-to-C++ Compiler + +.SH SYNOPSIS +shedskin [OPTION]... FILE + + +.\" visit_block_quote +\-a \-\-noann Don\'t output annotated source code + +\-b \-\-nobounds Disable bounds checking + +\-d \-\-dir Specify alternate directory for output files + +\-e \-\-extmod Generate extension module + +\-f \-\-flags Provide alternate Makefile flags + +\-r \-\-random Use fast random number generator + +\-w \-\-nowrap Disable wrap\-around checking + + +.\" depart_block_quote + +.SH DESCRIPTION +Shed Skin is an experimental Python\-to\-C++ compiler designed to speed up the execution of Python programs. It converts programs written in a static subset of Python to C++. The C++ code can be compiled to executable code, which can be run either as a standalone program or as a module imported and called from CPython. + + +.SH LIMITATIONS +(See the documentation for a more detailed overview.) + + +.TP 3 +1. +Variables must be (implicitly) statically typed. Abstract types (as in C++) are supported. + + +.TP 3 +2. +Several Python features cannot be used or only partially. For example, nested functions and variable numbers of arguments are not supported. + + +.TP 3 +3. +Programs cannot freely use the standard library, only those available in +.\" visit_literal +lib/ +.\" depart_literal +. + + +.SH OPTIONS + +.SH THANKS +Google, Bearophile, Brian Blais, Paul Boddie, Djamel Cherif, Mark Dewing, James Coughlan, Luis M. Gonzales, Karel Heyse, Denis de Leeuw Duarte, Michael Elkins, FFAO, Van Lindberg, David Marek, Jeff Miller, Joaquin Abian Monux, Harri Pasanen, SirNotAppearingInThisManPage, Dave Tweed, Jaroslaw Tworek, Pavel Vinogradov + + +.SH AUTHOR +mark.dufour@gmail.com + +.SH COPYRIGHT +GPL version 3 or later + +.\" Generated by docutils manpage writer on 2009-07-15 14:30. +.\" diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.install --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.install Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,7 @@ +ss.py usr/lib/shedskin/bin/ +shared.py usr/lib/shedskin/bin/ +extmod.py usr/lib/shedskin/bin/ +graph.py usr/lib/shedskin/bin/ +infer.py usr/lib/shedskin/bin/ +cpp.py usr/lib/shedskin/bin/ +backward.py usr/lib/shedskin/bin/ diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.postinst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.postinst Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,44 @@ +#! /bin/sh +# postinst script for ShedSkin +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +PACKAGE=shedskin + +case "$1" in + configure|abort-upgrade|abort-remove|abort-deconfigure) + # ss is already a program + chmod ugo+rx /usr/lib/shedskin/bin/ss.py /usr/bin/shedskin + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + + +exit 0 + + diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.postinst.debhelper --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.postinst.debhelper Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,8 @@ +# Automatically added by dh_pycentral +if which pycentral >/dev/null 2>&1; then + pycentral pkginstall shedskin + if grep -qs '^shedskin$' /var/lib/pycentral/delayed-pkgs; then + sed -i '/^shedskin$/d' /var/lib/pycentral/delayed-pkgs + fi +fi +# End automatically added section diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.prerm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.prerm Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,20 @@ +#! /bin/sh +# prerm script for ShedSkin + +set -e + +PACKAGE=shedskin + +case "$1" in + remove|upgrade|failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + + +exit 0 diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.prerm.debhelper --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.prerm.debhelper Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,45 @@ +# Automatically added by dh_pycentral +case "$1" in remove|upgrade) + pkgremove=y +esac +if [ -f /var/lib/pycentral/shedskin.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then + pkgremove=y +fi +if [ "$pkgremove" = y ]; then +if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then + pycentral pkgremove shedskin +else + flist=$(tempfile) + slist=$(tempfile) + dpkg -L shedskin | tee $flist | \ + while read n; do + case "$n" in + /usr/share/pyshared/*) + n2=${n#/usr/share/pyshared/*} + case "$n" in + *.py) echo "p $n";; + *) [ -d "$n" ] && echo "d $n2" || echo "f $n2" + esac + ;; + *) continue + esac + done > $slist + if [ -s $slist ]; then + for d in /usr/lib/python[0-9].[0-9]/????-packages; do + case "$d" in */python2.1/*|*/python2.2/*) continue; esac + while read t n; do + case "$t" in + p) rm -f $d/$n $d/${n}[co];; + d) rmdir $d/$n 2>/dev/null || true;; + *) rm -f $d/$n + esac + done < $slist + done + fi + awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \ + | xargs -r rm -f >&2 + rm -f $flist $slist +fi +rm -f /var/lib/pycentral/shedskin.pkgremove +fi +# End automatically added section diff -r 000000000000 -r bb744d9b1d01 debian/shedskin.substvars --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/shedskin.substvars Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,2 @@ +python:Versions=all +python:Depends=python, python-central (>= 0.6.7) diff -r 000000000000 -r bb744d9b1d01 debian/test.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/test.py Mon Jan 11 01:41:58 2010 +0100 @@ -0,0 +1,1 @@ +print 'hello, world!'