Question about RestrictedPython installation with python2.6
Good day. All is fine if i build RestrictedPython (3.6.0) with python27, but when i try to do this with python2.6 i have problems like this: """ byte-compiling build/bdist.freebsd-8.2-RELEASE-i386/egg/RestrictedPython/tests/before_and_after27.py to before_and_after27.pyc SyntaxError: ('invalid syntax', ('build/bdist.freebsd-8.2-RELEASE-i386/egg/RestrictedPython/tests/before_and_after27.py', 35, 17, ' x = {y: y for y in whatever if y}\n')) """ """ Extracting RestrictedPython-3.6.0-py2.6.egg to /usr/local/lib/python2.6/site-packages SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/site-packages/RestrictedPython-3.6.0-py2.6.egg/RestrictedPython/tests/before_and_after27.py', 35, 17, ' x = {y: y for y in whatever if y}\n')) SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/site-packages/RestrictedPython-3.6.0-py2.6.egg/RestrictedPython/tests/security_in_syntax27.py', 11, 13, ' {y: y for _restricted_name in x}\n')) SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/site-packages/RestrictedPython-3.6.0-py2.6.egg/RestrictedPython/tests/before_and_after27.py', 35, 17, ' x = {y: y for y in whatever if y}\n')) SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/site-packages/RestrictedPython-3.6.0-py2.6.egg/RestrictedPython/tests/security_in_syntax27.py', 11, 13, ' {y: y for _restricted_name in x}\n')) Adding RestrictedPython 3.6.0 to easy-install.pth file """ And this is breaks packaging on FreeBSD, since there will be no before_and_after27.py[c,o] and security_in_syntax27.py[c,o] that we expecting. I know that this files included conditionally, but easy_install still tries to compile them all independent of python version. As result - we see this ugly errors. Is there anything i can do with this? (some easy_install option to not compile this files) or can i anyhow to not build and install tests? Thanks in advance for answer. -- Regards, Ruslan Tinderboxing kills... the drives.
On Mon, Oct 10, 2011 at 11:12 AM, Ruslan Mahmatkhanov <cvs-src@yandex.ru> wrote:
And this is breaks packaging on FreeBSD, since there will be no before_and_after27.py[c,o] and security_in_syntax27.py[c,o] that we expecting. I know that this files included conditionally, but easy_install still tries to compile them all independent of python version. As result - we see this ugly errors. Is there anything i can do with this? (some easy_install option to not compile this files) or can i anyhow to not build and install tests? Thanks in advance for answer.
There's no options for easy_install that prevent these. You'll have to either use the underlying setuptools API's or write some post-cleanup script that does what you need here. Those error messages are annoying, but we'll likely won't get rid of them before we switch to the new "packaging" / "distutils" libraries some time in the future. Hanno
Hanno Schlichting wrote on 10.10.2011 13:22:
On Mon, Oct 10, 2011 at 11:12 AM, Ruslan Mahmatkhanov<cvs-src@yandex.ru> wrote:
And this is breaks packaging on FreeBSD, since there will be no before_and_after27.py[c,o] and security_in_syntax27.py[c,o] that we expecting. I know that this files included conditionally, but easy_install still tries to compile them all independent of python version. As result - we see this ugly errors. Is there anything i can do with this? (some easy_install option to not compile this files) or can i anyhow to not build and install tests? Thanks in advance for answer.
There's no options for easy_install that prevent these. You'll have to either use the underlying setuptools API's or write some post-cleanup script that does what you need here.
Those error messages are annoying, but we'll likely won't get rid of them before we switch to the new "packaging" / "distutils" libraries some time in the future.
Hanno
Ok, thank you. I was able to avoid this packaging error with packaging infrastructure itself. But i'm wonder isn't there no means to separate tests/ and the main package and install them conditionally (if user requests it or if he is not)? -- Regards, Ruslan Tinderboxing kills... the drives.
participants (2)
-
Hanno Schlichting -
Ruslan Mahmatkhanov