2.1 --- a/debian/control Sun Jun 20 21:42:04 2010 +0200
2.2 +++ b/debian/control Tue Jul 13 17:40:01 2010 +0200
2.3 @@ -11,7 +11,7 @@
2.4 Package: shedskin
2.5 Architecture: all
2.6 Depends: ${python:Depends}, libgc-dev (>= 6.8), libpcre3-dev (>= 7.4)
2.7 -Suggests: g++
2.8 +Suggests: g++, make
2.9 XB-Python-Version: ${python:Versions}
2.10 Description: Python-to-C++ compiler designed to speed up Python programs
2.11 Shed Skin converts programs written in a static subset of Python to C++.
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/python25print.diff Tue Jul 13 17:40:01 2010 +0200
4.3 @@ -0,0 +1,57 @@
4.4 +--- shedskin/lib/builtin.py (revision 1507)
4.5 ++++ shedskin/lib/builtin.py (working copy)
4.6 +@@ -1,5 +1,3 @@
4.7 +-from __future__ import print_function
4.8 +-
4.9 + class class_:
4.10 + def __repr__(self):
4.11 + return self.__name__
4.12 +@@ -848,5 +846,5 @@
4.13 + return iter1.next()
4.14 + return fillvalue
4.15 +
4.16 +-def print(__kw_sep=0, __kw_end=0, __kw_file=0, *value):
4.17 ++def __print(__kw_sep=0, __kw_end=0, __kw_file=0, *value):
4.18 + value.__str__()
4.19 +--- shedskin/graph.py (revision 1507)
4.20 ++++ shedskin/graph.py (working copy)
4.21 +@@ -1200,6 +1200,8 @@
4.22 + elif isinstance(node.node, Name):
4.23 + # direct call
4.24 + ident = node.node.name
4.25 ++ if ident == 'print':
4.26 ++ ident = node.node.name = '__print' # XXX
4.27 +
4.28 + if ident in ['getattr', 'setattr', 'slice', 'type']:
4.29 + error("'%s' function is not supported" % ident, node.node)
4.30 +--- shedskin/cpp.py (revision 1507)
4.31 ++++ shedskin/cpp.py (working copy)
4.32 +@@ -1656,6 +1656,8 @@
4.33 + return
4.34 + elif ident == 'hash':
4.35 + self.append('hasher(') # XXX cleanup
4.36 ++ elif ident == '__print': # XXX
4.37 ++ self.append('print(')
4.38 + elif ident == 'isinstance' and isinstance(node.args[1], Name) and node.args[1].name in ['float','int']:
4.39 + error("'isinstance' cannot be used with ints or floats; assuming always true", node, warning=True)
4.40 + self.append('1')
4.41 +@@ -1716,7 +1718,7 @@
4.42 + objexpr, ident, direct_call, method_call, constructor, parent_constr = analyze_callfunc(node)
4.43 + target = funcs[0] # XXX
4.44 +
4.45 +- print_function = self.library_func(funcs, 'builtin', None, 'print')
4.46 ++ print_function = self.library_func(funcs, 'builtin', None, '__print')
4.47 +
4.48 + castnull = False # XXX
4.49 + if (self.library_func(funcs, 'random', None, 'seed') or \
4.50 +--- shedskin/shared.py (revision 1507)
4.51 ++++ shedskin/shared.py (working copy)
4.52 +@@ -764,7 +764,7 @@
4.53 + missing = formals[len(actuals):-len(func.defaults)]
4.54 +
4.55 + skip_defaults = True # XXX
4.56 +- if not func.mv.module.builtin or func.mv.module.ident in ['random', 'itertools', 'datetime', 'ConfigParser', 'csv'] or (func.ident in ('sort','sorted', 'min', 'max', 'print')):
4.57 ++ if not func.mv.module.builtin or func.mv.module.ident in ['random', 'itertools', 'datetime', 'ConfigParser', 'csv'] or (func.ident in ('sort','sorted', 'min', 'max', '__print')):
4.58 + if not (func.mv.module.builtin and func.ident == 'randrange'):
4.59 + skip_defaults = False
4.60 +
5.1 --- a/setup.py.diff Sun Jun 20 21:42:04 2010 +0200
5.2 +++ b/setup.py.diff Tue Jul 13 17:40:01 2010 +0200
5.3 @@ -1,10 +1,11 @@
5.4 --- setup.py 2010-06-20 20:55:37.000000000 +0200
5.5 +++ setup.py 2010-06-20 20:55:47.000000000 +0200
5.6 -@@ -7,6 +7,5 @@
5.7 +@@ -7,6 +7,6 @@
5.8 description='Shed Skin is an experimental compiler, that can translate pure, but implicitly statically typed Python programs into optimized C++. It can generate stand-alone programs or extension modules that can be imported and used in larger Python programs.',
5.9 url='http://code.google.com/p/shedskin/',
5.10 scripts=['scripts/shedskin'],
5.11 - packages=['shedskin'],
5.12 - package_data={'shedskin': ['lib/*.cpp', 'lib/*.hpp', 'lib/*.py', 'lib/os/*.cpp', 'lib/os/*.hpp', 'lib/os/*.py', 'FLAGS']},
5.13 -+ packages=['shedskin']
5.14 ++ packages=['shedskin'],
5.15 ++ package_data={'shedskin': ['FLAGS']},
5.16 )