RE: [ZODB-Dev] zodb-3.5.0 install : Syntax error on sampletests_i.py
[Chris Bainbridge] >> I noticed the following error installing Gentoo / python 2.3.5: >> >> byte-compiling > /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testi ng/testrunner-ex/sample2/sampletests_f.py >> to sampletests_f.pyc byte-compiling > /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testi ng/testrunner-ex/sample2/sampletests_i.py >> to sampletests_i.pyc >> File "usr/lib/python2.3/site-packages/zope/testing/testrunner-ex/sample2/samplete sts_i.py", >> line 15 >> importx unittest >>^ >> SyntaxError: invalid syntax ... [Tim Peters] > Ah, fudge. That's a genuine syntax error in the zope.testing file > named (it says "importx" instead of "import"). > > Jim, know immediately what's up with that? Is the syntax error > intentional? Why doesn't it cause the zope.testing tests to fail > (sampletest_i.py can't be compiled or imported)? Looks like it's intentional. The zope.testing tests expect to see this syntax error. Unfortunately, distutils tries to compile all .py files. > I'm afraid this affects all projects that stitch in zope.testing from > > svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing > > which includes all versions of ZODB >= 3.4. OTOH, it appears harmless. Yes, you get a nuisance complaint, but it shouldn't hurt the installation any. > Chris, until this is straightened out, try passing the > > --no-compile > > option to your "setup.py install" command, e.g. > > python setup.py install --no-compile > > ... Heh. Sorry about that, I was going by the docs; --no-compile doesn't appear to have any effect in reality; I opened a Python bug report on this: http://www.python.org/sf/1290382 Oh, double fudge. This doesn't appear to be a distutils problem after all -- it seems to be unique to setup.py thingies created _by_ Zope's zpkgtools. ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
RE: [ZODB-Dev] zodb-3.5.0 install : Syntax error on sampletests_i.py
[Chris Bainbridge] > I noticed the following error installing Gentoo / python 2.3.5: > > byte-compiling /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testi ng/testrunner-ex/sample2/sampletests_f.py > to sampletests_f.pyc > byte-compiling /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testi ng/testrunner-ex/sample2/sampletests_i.py > to sampletests_i.pyc > File "usr/lib/python2.3/site-packages/zope/testing/testrunner-ex/sample2/samplete sts_i.py", > line 15 > importx unittest >^ > SyntaxError: invalid syntax > ... Ah, fudge. That's a genuine syntax error in the zope.testing file named (it says "importx" instead of "import"). Jim, know immediately what's up with that? Is the syntax error intentional? Why doesn't it cause the zope.testing tests to fail (sampletest_i.py can't be compiled or imported)? I'm afraid this affects all projects that stitch in zope.testing from svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing which includes all versions of ZODB >= 3.4. Chris, until this is straightened out, try passing the --no-compile option to your "setup.py install" command, e.g. python setup.py install --no-compile Python compiles to .pyc as needed automatically, as a normal side effect of importing a module (so there's usually no _need_ for an install to compile to .pyc), and the invalid sampletests_i.py has nothing to do with normal ZODB operation (ZODB never imports it, so its syntax error will never matter to running ZODB). ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
[ZODB-Dev] zodb-3.5.0 install : Syntax error on sampletests_i.py
Hi, I noticed the following error installing Gentoo / python 2.3.5: byte-compiling /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testing/testrunner-ex/sample2/sampletests_f.py to sampletests_f.pyc byte-compiling /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testing/testrunner-ex/sample2/sampletests_i.py to sampletests_i.pyc File "usr/lib/python2.3/site-packages/zope/testing/testrunner-ex/sample2/sampletests_i.py", line 15 importx unittest ^ SyntaxError: invalid syntax byte-compiling /var/tmp/portage/zodb-3.5.0/image/usr/lib/python2.3/site-packages/zope/testing/testrunner-ex/sample2/sampletests_ntd.py to sampletests_ntd.pyc ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev