On Tue, Aug 17, 2010 at 10:46 AM, Allan McRae <[email protected]> wrote: > Hi, > > I have pushed the new python (3.1) and python2 (2.7) packages to the new > [staging] repo so rebuilds can start there. Remember the staging repo > should never be used outside a build chroot... If you do, everything python > related will break on your system. > > TUs will not be able to start uploading rebuilds yet as they do not have a > staging equivalent, but we will sort something out for them once we get all > the db-scripts/devtools changes tested for the main one first. The package > pool is going to save us a heap of issues when this gets moved so it is > worth the wait. > > > The key things to remember with the rebuild are: > > - build in clean chroots. Most packages will detect "python2" or > "python-2.7" once they see no "python" and use that. Some will need simple > patching. > > - change your dependencies to python2 > > - check files for #!'s with "/usr/bin/python" or "/usr/bin/env python". If > you have those you will need to do a sed to change them to python2.
Perhaps the "universal sed statement" should go on the wiki? Just an initial stab: find $srcdir -name '*.py' -print0 | xargs sed -i -e 's|#!/usr/bin/python#!/usr/bin/python2#' -e 's|#!/usr/bin/env python#!/usr/bin/env python2#' -Dan

