Last Comment Bug 427750 - Require python >= 2.4 to build Mozilla (and >=2.5 on Windows hosts)
: Require python >= 2.4 to build Mozilla (and >=2.5 on Windows hosts)
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla1.9.2a1
Assigned To: Ted Mielczarek [:ted.mielczarek]
:
:
Mentors:
: 467526 (view as bug list)
Depends on: 467595
Blocks: 464191 504994 C192ConfSync 548670 613811
  Show dependency treegraph
 
Reported: 2008-04-08 05:53 PDT by Jeff Walden [:Waldo] (remove +bmo to email)
Modified: 2010-11-20 22:09 PST (History)
8 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.9-fixed


Attachments
require Python 2.4, 2.5 on Windows [Checkin: Comment 11] (1.96 KB, patch)
2008-11-24 08:06 PST, Ted Mielczarek [:ted.mielczarek]
benjamin: review+
Details | Diff | Splinter Review
require Python 2.4, 2.5 on Windows HOST [Checkin: Comment 25] (1.96 KB, patch)
2009-04-07 12:14 PDT, neil@parkwaycc.co.uk
ted: review+
Details | Diff | Splinter Review
(Cv1-CC) Port (the useful part of) it to comm-central [Checkin: Comment 28 & 37] (947 bytes, patch)
2010-02-15 16:52 PST, Serge Gautherie (:sgautherie)
bugspam.Callek: review+
kairo: review+
Details | Diff | Splinter Review
(Dv1-191) Copy it to m-1.9.1 too [Checkin: Comment 33] (2.91 KB, patch)
2010-02-26 01:26 PST, Serge Gautherie (:sgautherie)
mbeltzner: approval1.9.1.9+
Details | Diff | Splinter Review

Description Jeff Walden [:Waldo] (remove +bmo to email) 2008-04-08 05:53:26 PDT
Among other things, this would give us subprocess, which would simplify the matter of creating new processes in Python.  (We'd still need killableprocess for adding the crucial API for killing processes, but that's a minor hurdle compared to writing process code using at least two different process abstractions.)  Bug 418009's patch, followup fix, and followup followup fix are examples of the problems this causes.
Comment 1 Benjamin Smedberg [:bsmedberg] 2008-04-08 06:02:19 PDT
Can we require 2.4 on linux/mac and 2.5 on Windows? MozillaBuild already comes with 2.5, but linux distros have all kinds of python and I don't particularly want to require 2.5 there.

I'm pretty sure we can have a standard API based on subprocess/killableprocess that works with 2.5/win 2.4/maclinux
Comment 2 Jeff Walden [:Waldo] (remove +bmo to email) 2008-04-08 10:06:09 PDT
Don't distros usually dump python2.5 in a separate package if that's necessary?  MacPorts does that, certainly, and requiring someone to put something in their mozconfigs isn't that big a deal.

It's not just the libraries that make Python 2.5 desirable, it's being able to use the same language and same features everywhere -- array comprehensions come to mind as one such feature that you have to actively remember not to use if we're going to split our requirements this way.  I'd very much prefer the exact same version of the language everywhere, and I'm sure people writing Python scripts in the tree who happen to be on systems with 2.5 would agree that it's more pain to remember to test with a version that's not the default on their system in addition to whatever the default is.
Comment 3 Ted Mielczarek [:ted.mielczarek] 2008-11-12 10:36:47 PST
Per IRC discussion, we're comfortable requiring 2.4, and 2.5 on Windows. Scratchbox ships with 2.3 by default, but ships 2.4 as python2.4. OS X 10.4 ships with 2.3 by default, but 2.4/2.5 are easily installable via darwinports (which you need to use to get other build dependencies anyway). We only officially support MozillaBuild on Windows, which ships with 2.5, and Waldo thinks 2.5-isms have crept into the Windows paths of our Python code anyway, so we might as well make that requirement explicit.

We could make life slightly easier for the scratchbox folks by changing the check to be something like:
AC_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)

but it's not a requirement.
Comment 4 Ted Mielczarek [:ted.mielczarek] 2008-11-24 08:06:10 PST
Created attachment 349753 [details] [diff] [review]
require Python 2.4, 2.5 on Windows
[Checkin: Comment 11]

Pretty simple test.
Comment 5 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-11-24 11:29:04 PST
(In reply to comment #3)
> We could make life slightly easier for the scratchbox folks by changing the
> check to be something like:
> AC_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)

Mind throwing that in to the current patch? Would save us some trouble...
Comment 6 Ted Mielczarek [:ted.mielczarek] 2008-11-24 11:33:05 PST
Will do, I forgot about that.
Comment 7 Ted Mielczarek [:ted.mielczarek] 2008-12-02 03:39:46 PST
Pushed (with the scratchbox-assistance change):
http://hg.mozilla.org/mozilla-central/rev/96956634349c
Comment 8 Ted Mielczarek [:ted.mielczarek] 2008-12-02 11:18:09 PST
I backed this out because it broke the Mobile build, because Scratchbox in fact only ships 2.3 by default. I'm going to file a RelEng bug to get the Mobile tinderbox updated, and we'll just have to put it in the build setup documentation.
Comment 9 Ted Mielczarek [:ted.mielczarek] 2009-02-10 04:29:59 PST
*** Bug 467526 has been marked as a duplicate of this bug. ***
Comment 10 Ted Mielczarek [:ted.mielczarek] 2009-03-10 08:41:46 PDT
I'll check this back in soon, since the tinderboxes all got updated.
Comment 11 Ted Mielczarek [:ted.mielczarek] 2009-04-06 11:09:39 PDT
Re-pushed to m-c:
http://hg.mozilla.org/mozilla-central/rev/ad1cb31760d0
Comment 12 Serge Gautherie (:sgautherie) 2009-04-06 15:11:13 PDT
I don't know what the situation was a year ago,
but current python releases are:
{
http://www.python.org/download/releases/

2.3.5-2.3.7: security-fix-only mode
2.4.4-2.4.6: same
2.5.4-(fut): same
2.6.1      : bugfix-only mode
3.0.1      : same
3.1        : current version
}

Thus, moving away from 2.3 (and earlier) is good :-)

Then, what about a plan for followups ?
To 2.5: to have the same on all platforms, as written in some previous comments.
To 2.6: later?
Comment 13 Benjamin Smedberg [:bsmedberg] 2009-04-06 15:35:19 PDT
Why do we need further plans? 2.4+ solves our current problems.
Comment 14 Serge Gautherie (:sgautherie) 2009-04-06 23:57:29 PDT
(In reply to comment #13)

I was referring to comment 2 then using a supported version just seems good.
Comment 15 neil@parkwaycc.co.uk 2009-04-07 12:14:32 PDT
Created attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]
Comment 16 neil@parkwaycc.co.uk 2009-04-10 16:12:32 PDT
Comment on attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]

>-        HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
>+        HOST_AR_FLAGS='-NOLOGO -OUT:$@'
Whoops. Sorry about that. Remind me not to check it in ;-)
Comment 17 Stuart Parmenter 2009-04-15 13:33:52 PDT
this breaks scratchbox builds...
Comment 18 Ted Mielczarek [:ted.mielczarek] 2009-04-15 13:43:20 PDT
So update the docs. RelEng updated Python in Scratchbox on all the build machines.
Comment 19 Ted Mielczarek [:ted.mielczarek] 2009-04-21 08:54:46 PDT
Comment on attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]

-        HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
+        HOST_AR_FLAGS='-NOLOGO -OUT:$@'

Unrelated change?

r=me otherwise.
Comment 20 neil@parkwaycc.co.uk 2009-04-22 06:00:39 PDT
Comment on attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]

Pushed changeset 3e3a7373a3d0 to mozilla-central.
Comment 21 John O'Duinn [:joduinn] (please use "needinfo?" flag) 2009-05-08 12:48:13 PDT
Can this patch also be landed on mozilla-1.9.1? It would let us simplify some mobile fennec unittest work, see details in bug#462889 (comment#21).
Comment 22 Benjamin Smedberg [:bsmedberg] 2009-05-08 12:54:20 PDT
Why do you need it? It just sets the minimum version, and shouldn't affect the release systems at all.
Comment 23 John O'Duinn [:joduinn] (please use "needinfo?" flag) 2009-05-08 18:38:36 PDT
(In reply to comment #21)
> Can this patch also be landed on mozilla-1.9.1? It would let us simplify some
> mobile fennec unittest work, see details in bug#462889 (comment#21).

(In reply to comment #22)
> Why do you need it? It just sets the minimum version, and shouldn't affect the
> release systems at all.

Inside scratchbox, /usr/bin/python is 2.3, so we want to look for 2.5 first. If this patch is landed on the 1.9.1 branch, then it will simplify a little what aki has to do in bug#462889... see attachment and recent comments there for more details.

Does that help clarify?
Comment 24 :Gavin Sharp [email: gavin@gavinsharp.com] 2009-05-08 19:13:52 PDT
The patches here don't include it, but Ted changed MOZ_PATH_PROGS to check for python2.5 when he pushed them:

http://hg.mozilla.org/mozilla-central/rev/ad1cb31760d0#l24
Comment 25 Serge Gautherie (:sgautherie) 2010-02-13 17:30:52 PST
(In reply to comment #20)
> (From update of attachment 371499 [details] [diff] [review])
> Pushed changeset 3e3a7373a3d0 to mozilla-central.

Correct changeset is:
http://hg.mozilla.org/mozilla-central/rev/0611a19fee9d
Followup to bug 427750 to check for Python 2.5 only when building on Windows as a host
Comment 26 Serge Gautherie (:sgautherie) 2010-02-15 16:52:20 PST
Created attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]

PYTHON_VERSION check in m-c should be enough.
Comment 27 Justin Wood (:Callek) 2010-02-15 19:38:25 PST
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]

I am partial to having the ver check here; but its not a requirement; I'll check with KaiRo if its worthwhile [later] no need to do it on my preference.
Comment 28 Serge Gautherie (:sgautherie) 2010-02-15 21:07:55 PST
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]


http://hg.mozilla.org/comm-central/rev/4e74b1e6e94c
Comment 29 Ted Mielczarek [:ted.mielczarek] 2010-02-16 04:19:28 PST
In the future, please file new bugs instead of adding patches to bugs that have been closed for many months.
Comment 30 Serge Gautherie (:sgautherie) 2010-02-26 01:26:44 PST
Created attachment 429080 [details] [diff] [review]
(Dv1-191) Copy it to m-1.9.1 too
[Checkin: Comment 33]

"approval1.9.1.9=?":
Zero risk, build config only.
To fix bug 548670.
Comment 31 Mike Beltzner [:beltzner, not reading bugmail] 2010-03-01 10:23:32 PST
Comment on attachment 429080 [details] [diff] [review]
(Dv1-191) Copy it to m-1.9.1 too
[Checkin: Comment 33]

a1919=beltzner, but please do as Ted suggests next time
Comment 32 Serge Gautherie (:sgautherie) 2010-03-01 14:24:49 PST
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]


Looking for "approval-seamonkey2.0.4=?" actually.
Comment 33 Serge Gautherie (:sgautherie) 2010-03-01 14:32:53 PST
Comment on attachment 429080 [details] [diff] [review]
(Dv1-191) Copy it to m-1.9.1 too
[Checkin: Comment 33]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/5b9590ed573d

Sorry, I pushed with my name...
Comment 34 Serge Gautherie (:sgautherie) 2010-03-01 14:35:53 PST
(In reply to comment #31)
> please do as Ted suggests next time

I'd be happy to use the hundreds of bugs that someone would file to deal with
http://dev.seamonkey.at/?d=x&i=mozilla&m=c
... :-|
Comment 35 Ted Mielczarek [:ted.mielczarek] 2010-03-02 04:13:44 PST
Just because someone isn't going to file your bugs for you doesn't mean you can co-opt mine. I'm fine with you reusing my bugs when they're still open, but please don't dredge up bugs that have been closed for a long time. Feel free to file one big bug for all your work, I don't care.
Comment 36 Robert Kaiser 2010-03-02 06:36:50 PST
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]

a-sm2.0.4=me
Comment 37 Serge Gautherie (:sgautherie) 2010-03-02 06:57:24 PST
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]


http://hg.mozilla.org/releases/comm-1.9.1/rev/24075bb298ee
Comment 38 Serge Gautherie (:sgautherie) 2010-03-02 07:07:06 PST
(In reply to comment #35)
> Feel free to file one big bug for all your work, I don't care.

I'll do ... and just get complains about that again :-[

Note You need to log in before you can comment on or make changes to this bug.