[Python-3000] setup.py fails in the py3k-struni branch
Alexandre Vassalotti
alexandre at peadrop.com
Thu Jun 7 17:47:28 CEST 2007
On 6/6/07, Neal Norwitz <nnorwitz at gmail.com> wrote:
> This probably means there is a problem with marshalling the byte code
> out. The first run compiles the .pyc files. Theoretically this
> writes out the same thing in memory. This isn't always the case
> though (ie, when there are bugs).
>
> A work around would be to just remove the .pyc files each time rather
> than do a make clean. Do:
>
> find . -name '*.pyc' -print0 | xargs -0 rm
>
Nope. Removing the byte-compiled Python files didn't change anything.
> Bonus points for finding the bug. :-)
Oh? :)
> A quick way to test this is to try to roundrip it. Something like:
>
> >>> s = '''\
> ... class F:
> ... def foo(self, *args):
> ... print(self, args)
> ... '''
> >>> code = compile(s, 'foo', 'exec')
> >>> import marshal
> >>> marshal.loads(marshal.dumps(code)) == code
> True
>
> If it doesn't equal True, you found the problem.
I got True. So, the problem probably not the byte code.
-- Alexandre
More information about the Python-3000
mailing list