1.1 --- a/debian/shedskin.install Tue Sep 06 23:58:04 2011 +0200
1.2 +++ b/debian/shedskin.install Wed Sep 07 00:05:17 2011 +0200
1.3 @@ -1,5 +1,7 @@
1.4 shedskin/lib/*.cpp usr/share/shedskin/lib/
1.5 shedskin/lib/*.hpp usr/share/shedskin/lib/
1.6 +shedskin/lib/builtin/*.cpp usr/share/shedskin/lib/builtin/
1.7 +shedskin/lib/builtin/*.hpp usr/share/shedskin/lib/builtin/
1.8 shedskin/lib/*.py usr/share/shedskin/lib/
1.9 shedskin/lib/os/*.cpp usr/share/shedskin/lib/os/
1.10 shedskin/lib/os/*.hpp usr/share/shedskin/lib/os/
2.1 --- a/python25print.diff Tue Sep 06 23:58:04 2011 +0200
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,57 +0,0 @@
2.4 ---- shedskin/lib/builtin.py (revision 1507)
2.5 -+++ shedskin/lib/builtin.py (working copy)
2.6 -@@ -1,5 +1,3 @@
2.7 --from __future__ import print_function
2.8 --
2.9 - class class_:
2.10 - def __repr__(self):
2.11 - return self.__name__
2.12 -@@ -848,5 +846,5 @@
2.13 - return iter1.next()
2.14 - return fillvalue
2.15 -
2.16 --def print(__kw_sep=0, __kw_end=0, __kw_file=0, *value):
2.17 -+def __print(__kw_sep=0, __kw_end=0, __kw_file=0, *value):
2.18 - value.__str__()
2.19 ---- shedskin/graph.py (revision 1507)
2.20 -+++ shedskin/graph.py (working copy)
2.21 -@@ -1200,6 +1200,8 @@
2.22 - elif isinstance(node.node, Name):
2.23 - # direct call
2.24 - ident = node.node.name
2.25 -+ if ident == 'print':
2.26 -+ ident = node.node.name = '__print' # XXX
2.27 -
2.28 - if ident in ['getattr', 'setattr', 'slice', 'type']:
2.29 - error("'%s' function is not supported" % ident, node.node)
2.30 ---- shedskin/cpp.py (revision 1507)
2.31 -+++ shedskin/cpp.py (working copy)
2.32 -@@ -1656,6 +1656,8 @@
2.33 - return
2.34 - elif ident == 'hash':
2.35 - self.append('hasher(') # XXX cleanup
2.36 -+ elif ident == '__print': # XXX
2.37 -+ self.append('print(')
2.38 - elif ident == 'isinstance' and isinstance(node.args[1], Name) and node.args[1].name in ['float','int']:
2.39 - error("'isinstance' cannot be used with ints or floats; assuming always true", node, warning=True)
2.40 - self.append('1')
2.41 -@@ -1716,7 +1718,7 @@
2.42 - objexpr, ident, direct_call, method_call, constructor, parent_constr = analyze_callfunc(node)
2.43 - target = funcs[0] # XXX
2.44 -
2.45 -- print_function = self.library_func(funcs, 'builtin', None, 'print')
2.46 -+ print_function = self.library_func(funcs, 'builtin', None, '__print')
2.47 -
2.48 - castnull = False # XXX
2.49 - if (self.library_func(funcs, 'random', None, 'seed') or \
2.50 ---- shedskin/shared.py (revision 1507)
2.51 -+++ shedskin/shared.py (working copy)
2.52 -@@ -764,7 +764,7 @@
2.53 - missing = formals[len(actuals):-len(func.defaults)]
2.54 -
2.55 - skip_defaults = True # XXX
2.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')):
2.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')):
2.58 - if not (func.mv.module.builtin and func.ident == 'randrange'):
2.59 - skip_defaults = False
2.60 -
3.1 --- a/setup.py.diff Tue Sep 06 23:58:04 2011 +0200
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,9 +0,0 @@
3.4 ---- setup.py 2011-05-26 20:08:09.000000000 +0200
3.5 -+++ setup.py 2011-05-27 00:30:34.000000000 +0200
3.6 -@@ -8,5 +8,5 @@
3.7 - url='http://code.google.com/p/shedskin/',
3.8 - scripts=['scripts/shedskin'],
3.9 - packages=['shedskin'],
3.10 -- package_data={'shedskin': ['lib/*.cpp', 'lib/*.hpp', 'lib/*.py', 'lib/os/*.cpp', 'lib/os/*.hpp', 'lib/os/*.py', 'FLAGS*', 'illegal']},
3.11 -+ package_data={'shedskin': ['FLAGS*', 'illegal']},
3.12 - )
4.1 --- a/shared.py.diff Tue Sep 06 23:58:04 2011 +0200
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,11 +0,0 @@
4.4 ---- shedskin/shared.py 2010-06-20 21:19:21.000000000 +0200
4.5 -+++ shedskin/shared.py 2010-06-20 21:19:47.000000000 +0200
4.6 -@@ -39,7 +39,7 @@
4.7 - self.iterations = 0
4.8 - self.lambdawrapper = {}
4.9 - self.sysdir = '/'.join(__file__.split(os.sep)[:-1])
4.10 -- self.libdir = connect_paths(self.sysdir, 'lib')
4.11 -+ self.libdir = connect_paths('/usr/share/shedskin', 'lib')
4.12 - self.main_mod = 'test'
4.13 - self.cpp_keywords = set(['asm', 'auto', 'bool', 'case', 'catch', 'char', 'const', 'const_cast', 'default', 'delete', 'do', 'double', 'dynamic_cast', 'enum', 'explicit', 'export', 'extern', 'false', 'float', 'friend', 'goto', 'inline', 'int', 'long', 'mutable', 'namespace', 'new', 'operator', 'private', 'protected', 'public', 'register', 'reinterpret_cast', 'short', 'signed', 'register', 'sizeof', 'static', 'static_cast', 'struct', 'switch', 'template', 'this', 'throw', 'true', 'typedef', 'typeid', 'typename', 'union', 'unsigned', 'using', 'virtual', 'void', 'volatile', 'wchar_t'])
4.14 - self.cpp_keywords.update(['stdin', 'stdout', 'stderr', 'std', 'abstract', 'st_mtime', 'st_atime', 'st_ctime', 'errno', 'fileno', 'environ', 'rand', 'optind', 'opterr', 'optopt', 'optarg', 'exit'])
5.1 --- a/typename-90ee8e7.diff Tue Sep 06 23:58:04 2011 +0200
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,20 +0,0 @@
5.4 ---- shedskin/lib/builtin.hpp 2011-03-19 16:08:45.000000000 +0100
5.5 -+++ shedskin/lib/builtin.hpp 2011-03-19 16:09:03.000000000 +0100
5.6 -@@ -1775,7 +1775,7 @@
5.7 -
5.8 - template<class T> inline __ss_bool pyiter<T>::__contains__(T t) {
5.9 - T e;
5.10 -- pyiter<T>::for_in_loop __3;
5.11 -+ typename pyiter<T>::for_in_loop __3;
5.12 - int __2;
5.13 - pyiter<T> *__1;
5.14 - FOR_IN_NEW(e,this,1,2,3)
5.15 -@@ -2480,7 +2480,7 @@
5.16 - dict<K,V> *c = new dict<K,V>();
5.17 - memo->__setitem__(this, c);
5.18 - K e;
5.19 -- dict<K,V>::for_in_loop __3;
5.20 -+ typename dict<K,V>::for_in_loop __3;
5.21 - int __2;
5.22 - dict<K,V> *__1;
5.23 - FOR_IN_NEW(e,this,1,2,3)