Last Comment Bug 774203 - Error with python 2.7 distuils when installing mozmill
: Error with python 2.7 distuils when installing mozmill
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Build Config (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: Thunderbird 16.0
Assigned To: Philipp Kewisch [:Fallen]
:
Mentors:
Depends on:
Blocks: 750652
  Show dependency treegraph
 
Reported: 2012-07-16 01:48 PDT by Philipp Kewisch [:Fallen]
Modified: 2012-07-16 08:48 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed


Attachments
Fix - v1 (600 bytes, patch)
2012-07-16 01:49 PDT, Philipp Kewisch [:Fallen]
philipp: review+
standard8: approval‑comm‑aurora+
standard8: approval‑comm‑beta-
Details | Diff | Review

Description Philipp Kewisch [:Fallen] 2012-07-16 01:48:57 PDT
The patch for bug 750652 is breaking my local build and also the mac calendar builder with the following traceback:

Traceback (most recent call last):

  File "<string>", line 1, in <module>
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 88, in <module>
    run_setup(not IS_PYPY)
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 84, in run_setup
    cmdclass={'build_ext': ve_build_ext},
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/builds/slave/ca-macosx64-nightly/build/objdir-tb/i386/mozilla/_tests/mozmill-virtualenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py", line 56, in run
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 53, in run
    build_ext.run(self)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions
    self.build_extension(ext)
  File "/var/folders/h2/7nps6bvn5h33xdx61v7lrfpm0000gp/T/pip-6lYzCc-build/setup.py", line 59, in build_extension
    build_ext.build_extension(self, ext)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 498, in build_extension
    depends=ext.depends)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 572, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/unixccompiler.py", line 178, in _compile
    extra_postargs)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 873, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/spawn.py", line 34, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/tools/python-2.7.3/Python.framework/Versions/2.7/lib/python2.7/distutils/spawn.py", line 122, in _spawn_posix
    if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
ValueError: invalid literal for int() with base 10: ''

Looking at spawn.py cur_target is filled using os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target)

So I see two options fixing this:

1. Install self-compiled python 2.7 on the 10.7 machines that deploys to 10.5. The actual process is easy, i just did this on our mac machine

2. Try to use unset to really unset the value, so it defaults to the configured deployment target.
Comment 1 Philipp Kewisch [:Fallen] 2012-07-16 01:49:58 PDT
Created attachment 642507 [details] [diff] [review]
Fix - v1

This is the fix I was talking about. It works for the calendar mac builder.

It has already been reviewed in bug 750652.
Comment 2 Philipp Kewisch [:Fallen] 2012-07-16 01:53:26 PDT
Pushed to comm-central changeset f71ece130895.
Comment 3 Philipp Kewisch [:Fallen] 2012-07-16 03:11:13 PDT
Comment on attachment 642507 [details] [diff] [review]
Fix - v1

[Approval Request Comment] 
Risk to taking this patch (and alternatives if risky): I see no deliberate risk to this patch, since make calls the command in a sub-process and doesn't inherit unsetting the variable.
Comment 4 Mark Banner (:standard8) 2012-07-16 05:08:37 PDT
Comment on attachment 642507 [details] [diff] [review]
Fix - v1

Beta has already branched to release, I don't think you really need it there. Do you need it on comm-release though?
Comment 5 Philipp Kewisch [:Fallen] 2012-07-16 06:06:10 PDT
After the merge I need this everywhere except for comm-release (beta, aurora, central). If the merge happened after my c-c push, then I guess I only need to push this to beta.

> there. Do you need it on comm-release though?
I guess you mean comm-beta here? I don't need it on comm-release.
Comment 6 Mike Conley (:mconley) - (needinfo me!) 2012-07-16 08:48:08 PDT
comm-aurora: https://hg.mozilla.org/releases/comm-aurora/rev/806fd54d5464

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