← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/precise-makefile-python into lp:launchpad

 

Curtis Hovey has proposed merging lp:~sinzui/launchpad/precise-makefile-python into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #918276 in Launchpad itself: "Cannot do simple development with python 2.7"
  https://bugs.launchpad.net/launchpad/+bug/918276

For more details, see:
https://code.launchpad.net/~sinzui/launchpad/precise-makefile-python/+merge/89074

Use python 2.7 on Precise.

    Pre-implementation: no one

I upgraded to Precise and it does not have python2.6 We intend to make
Lp run on python2.7. 

--------------------------------------------------------------------

RULES

    * Update the Makefile to select the python2.7 of the env is precise,
      otherwise fallback to python2.6.
    * Removed the hardcoded version in update-sources because the script
      works in both 2.6 and 2.7


QA

    * Pull this branch in Precise, Oneiric, and Lucid.
    * For Precise, verify make buildout_bin creates bin/py and that
      it uses python2.7.
    * For Oneiric and Lucid, verify make buildout_bin creates bin/py
      and that it uses python2.6.
    * For each envirnonment run utilities/update-sourcecode
      and verify it does not have an import error.


LINT

  Makefile
  utilities/update-sourcecode
-- 
https://code.launchpad.net/~sinzui/launchpad/precise-makefile-python/+merge/89074
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/precise-makefile-python into lp:launchpad.
=== modified file 'Makefile'
--- Makefile	2011-12-29 05:29:36 +0000
+++ Makefile	2012-01-18 16:36:29 +0000
@@ -1,7 +1,8 @@
 # This file modified from Zope3/Makefile
 # Licensed under the ZPL, (c) Zope Corporation and contributors.
 
-PYTHON=python2.6
+PYTHON:=$(shell uname -r | sed -e 's/^3.2.*/python2.7/; s/^[23].*/python2.6/')
+
 WD:=$(shell pwd)
 PY=$(WD)/bin/py
 PYTHONPATH:=$(WD)/lib:$(WD)/lib/mailman:${PYTHONPATH}

=== modified file 'utilities/update-sourcecode'
--- utilities/update-sourcecode	2012-01-01 03:10:25 +0000
+++ utilities/update-sourcecode	2012-01-18 16:36:29 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6 -u
+#!/usr/bin/python -u
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).