Hi all, first of all Matthias will announce shortly the timeframe of the switch to Python2.4 by default. He will upload ASAP the new python-defaults to experimental and a few days later to unstable.
Once that is done we have to switch all our modules to work with python2.4. In parallel to that, we must switch our python packages to the new policy. The new policy still needs to be written down and Joe Wreschnig will do that (feel free to offer him your help). To implement this new policy, we need: 1/ an updated dh_python that will generate the right substvars (${python:Depends}, ${python:Versions} and ${python:Provides}), see #370833. Hopefully Joey Hess will integrate it soon now. 2/ to use either python-central or python-support to handle proper byte-compilation of the .py file for all available python versions that the module supports. Both packages are in unstable already. They will provide dh_pycentral and/or dh_pysupport that have to be called right before dh_python. 3/ to change the debian/rules file to adapt to the new python policy. The main difference is for extensions since they must be built for all supported python versions. Marc Duquesnes is working on adapting the CDBS class files for that. About python-central -------------------- Python-central relies heavily on the dpkg database to identify the .py files to bytecompile. For public modules/extensions, the .py files are moved to /usr/share/pycentral and they are then linked back into /usr/lib/pythonX.Y/site-packages where they are byte-compiled. The .so always stays in /usr/lib/pythonX.Y/site-packages/ Private modules/extensions are byte-compiled in place AFAIK. Python-central is called by the python packages themselves to byte-compile all installed modules for any newly installed python runtime (and same for removal). About python-support -------------------- Python-support byte-compiles (for all python versions) only what is installed in /usr/share/python-support/. For that it symlinks the .py files in /var/lib/python-support/python2.X/ and byte-compiles them there. That directory is then added to Python sys.path. Joss designed it only for arch: all packages. We'll have to extend it to handle extensions. This could be done by scanning /usr/lib/python2.X/site-packages looking for .so corresponding to files in /usr/share/python-suppport and symlinking those .so into /var/lib/python-support/python2.X/ Python-support supports private modules, any directory listed in /usr/share/python/$package.dirs will be byte-compiled in place. Python-support doesn't have any hook with the python packages but has a strong dependency on python so that when python is updated, python-support will have to be updated at the same time. This is needed to make sure that python-support can byte-compile all private modules with the new default python version. Question: will python-support byte-compile the already installed modules for python-2.5 when the user install this from experimental? => some hooks in the python package are probably needed anyway. Open issue ---------- We're lacking a standardized way to find out the list of versions that a given package is supposed to support. Someone should write a script that does: - extract the list of supported versions from the upcoming python-minimal (/usr/share/python/debian_defaults) - parse the XS-Python-Version and generate the list of python versions that the package supports (for example if XS-Python-Version says ">= 2.4", right now it would generate "2.4", if XS-P-V says "all", it would generate "2.3 2.4", etc.) Matthias will implement that in python-central as "pycentral showrequested" which complements the already existing "pycentral showversions". Cheers, -- Raphaël Hertzog Premier livre français sur Debian GNU/Linux : http://www.ouaza.com/livre/admin-debian/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]