FS#31171 - [python-sip] Uses “file” instead of “open”, which isn’t available on python3
Attached to Project:
Arch Linux
Opened by Phil Schaf (flying-sheep) - Friday, 17 August 2012, 14:44 GMT
Last edited by Andrea Scarpino (BaSh) - Sunday, 30 September 2012, 10:04 GMT
Opened by Phil Schaf (flying-sheep) - Friday, 17 August 2012, 14:44 GMT
Last edited by Andrea Scarpino (BaSh) - Sunday, 30 September 2012, 10:04 GMT
|
Details
As soon as you try to use this package on python3 with
distutils, it will crash with a stacktrace ending like
this:
File "/usr/lib/python3.2/site-packages/sipdistutils.py", line 111, in build_extension build_ext_base.build_extension(self, ext) File "/usr/lib/python3.2/distutils/command/build_ext.py", line 480, in build_extension sources = self.swig_sources(sources, ext) File "/usr/lib/python3.2/site-packages/sipdistutils.py", line 153, in swig_sources out = self._get_sip_output_list(sbf) File "/usr/lib/python3.2/site-packages/sipdistutils.py", line 58, in _get_sip_output_list for L in file(sbf): NameError: global name 'file' is not defined this is due to “file” being exclusively available as “open” in python3, while both names are available in python3. this bug can be fixed by replacing each call to “file” with an “open” call. to do this during the 2to3 call, one can use this method: http://www.devx.com/opensource/Article/42380/1763/page/5 else we could just patch the offending line. PS: is there seriously no python 3 package using SIP? |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Sunday, 30 September 2012, 10:04 GMT
Reason for closing: Fixed
Additional comments about closing: python-sip 4.14-1
Sunday, 30 September 2012, 10:04 GMT
Reason for closing: Fixed
Additional comments about closing: python-sip 4.14-1
also, sip, python2-sip, and python-sip are one package, built from the same sources. are you sure that http://www.riverbankcomputing.com/static/Downloads/sip4/sip-4.13.3.tar.gz is intended for use with python3?
If sip python bindings aren't meant to be used with python3 I should remove the package.