[csw-maintainers] Python 2.7

Peter FELECAN pfelecan at opencsw.org
Thu Jul 25 11:58:36 CEST 2013


Peter FELECAN <pfelecan at opencsw.org> writes:

> "Maciej (Matchek) Bliziński" <maciej at opencsw.org> writes:
>
>> Just a quick update: I did some testing and it seems like 2.6 with a
>> versioned directory plus an extra path in the module search path does work.
>> It's now pushed into unstable ‒ please test.
>
> 1. Installed the new package:
>
>    PKGINST:  CSWpython
>       NAME:  python - A high-level scripting language, 2.6 series
>    CATEGORY:  application
>       ARCH:  i386
>    VERSION:  2.6.8,REV=2013.07.22
>
> 2. alternatives --list
>
>    ...
>    python-symlink
>    ...
>
>    Can we use a more "natural" name, such as python? Or, maybe there is
>    a reason for using this name that I didn't get yet...
>
> 3. Installed self packaged Python 2.7, revision 21549.
>
>    Every sub-package containing Python code has some class error:
>
>    CSWpython27:
>
>      Compiling py files to normal bytecode ...
>      Error compiling: /opt/csw/lib/python2.7/filecmp.py
>      Error compiling: /opt/csw/lib/python2.7/netrc.py
>      Error compiling: /opt/csw/lib/python2.7/runpy.py
>      Error compiling: /opt/csw/lib/python2.7/subprocess.py
>      Error compiling: /opt/csw/lib/python2.7/zipfile.py
>      Compiling py files to optimized bytecode ...
>      Error compiling: /opt/csw/lib/python2.7/filecmp.py
>      Error compiling: /opt/csw/lib/python2.7/netrc.py
>      Error compiling: /opt/csw/lib/python2.7/runpy.py
>      Error compiling: /opt/csw/lib/python2.7/subprocess.py
>      Error compiling: /opt/csw/lib/python2.7/zipfile.py

After correcting the alternatives target symbolic link for 2.7, revision
21550, and running alternatives --config python-symlink and choosing
270, the following packages have no more class errors:

>    CSWpython27-tk:
>
>      Compiling py files to normal bytecode ...
>      Error compiling: /opt/csw/lib/python2.7/lib-tk/test/test_ttk/test_functions.py
>      Compiling py files to optimized bytecode ...
>      Error compiling: /opt/csw/lib/python2.7/lib-tk/test/test_ttk/test_functions.py
>
>    CSWidle27:
>
>      Compiling py files to normal bytecode ...
>      Error compiling: /opt/csw/lib/python2.7/idlelib/EditorWindow.py
>      Compiling py files to optimized bytecode ...
>      Error compiling: /opt/csw/lib/python2.7/idlelib/EditorWindow.py

I think that there is something to modify in
CSWcswclassutils.i.cswpycompile but, for the moment, I don't have any
useful ideas. Maybe some vector to carry the version needed for
compiling. As an aside, this brings up the question: why do we need to
compile at installation time and not deliver the pre-compiled bits; is
the p-code not portable on different architectures?
-- 
Peter


More information about the maintainers mailing list