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

Proposed by Curtis Hovey on 2012-01-18
Status: Merged
Merged at revision: 14700
Proposed branch: lp:~sinzui/launchpad/precise-makefile-python
Merge into: lp:launchpad
Diff against target: 24 lines (+4/-2)
2 files modified
Makefile (+3/-1)
utilities/update-sourcecode (+1/-1)
To merge this branch: bzr merge lp:~sinzui/launchpad/precise-makefile-python
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code 2012-01-18 Approve on 2012-01-18
Review via email: mp+89074@code.launchpad.net

Description of the Change

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

To post a comment you must log in.
Brad Crittenden (bac) wrote :

Hi Curtis this change looks good and I verified it works in 12.04. I wonder if basing on DISTRIB_RELEASE from /etc/lsb-release would be better than the kernel version number? It would certainly be more understandable.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2011-12-29 05:29:36 +0000
3+++ Makefile 2012-01-18 21:50:30 +0000
4@@ -1,7 +1,9 @@
5 # This file modified from Zope3/Makefile
6 # Licensed under the ZPL, (c) Zope Corporation and contributors.
7
8-PYTHON=python2.6
9+PYTHON:=$(shell sed -e \
10+ '/RELEASE/!d; s/.*=12.*/python2.7/; s/.*=.*/python2.6/' /etc/lsb-release)
11+
12 WD:=$(shell pwd)
13 PY=$(WD)/bin/py
14 PYTHONPATH:=$(WD)/lib:$(WD)/lib/mailman:${PYTHONPATH}
15
16=== modified file 'utilities/update-sourcecode'
17--- utilities/update-sourcecode 2012-01-01 03:10:25 +0000
18+++ utilities/update-sourcecode 2012-01-18 21:50:30 +0000
19@@ -1,4 +1,4 @@
20-#!/usr/bin/python2.6 -u
21+#!/usr/bin/python -u
22 #
23 # Copyright 2009 Canonical Ltd. This software is licensed under the
24 # GNU Affero General Public License version 3 (see the file LICENSE).