Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Issue 661334: Prepare swig for building pyauto on win (Closed)

Created:
10 years, 9 months ago by Nirnimesh
Modified:
9 years, 7 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Prepare swig for running pyauto on win. Work around a weird python nag on win. Python.h uses a _DEBUG macro to conditionally load debug version of the python lib. This conflicts with MSVS which defines _DEBUG in Debug configuration. This change works around this problem by including Python.h without the _DEBUG macro, since we don't want to debug python itself in any case. Accompanying CL in Cr src: http://codereview.chromium.org/661342 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=40423

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M swig/Lib/python/pyruntime.swg View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Nirnimesh
10 years, 9 months ago (2010-03-02 02:23:33 UTC) #1
John Grabowski
LGTM Hmm... can't view side by side diffs. Check your patch carefully. +// Include Python.h ...
10 years, 9 months ago (2010-03-02 05:51:20 UTC) #2
John Grabowski
Oh... shouldn't you try and upstream this? And add notes to the README.chromium about deltas ...
10 years, 9 months ago (2010-03-02 05:52:34 UTC) #3
Nirnimesh
On 2010/03/02 05:52:34, John Grabowski wrote: > Oh... shouldn't you try and upstream this? > ...
10 years, 9 months ago (2010-03-02 19:53:07 UTC) #4
John Grabowski
10 years, 9 months ago (2010-03-02 20:20:43 UTC) #5
This specific swig+python+MSVC _DEBUG problem has been discussed a lot from
> what
> I see on the internet. Their solution is to mangle with Python.h locally to
> disable the use of pythonXX_d.lib. The python folks have refused to make
> changes
> to Python.h in their tree since they _do_ want to debug python when
> compiling in
> Debug config in MSVC. Editing the swig python bindings seems a better
> approach
> to me.
>

Sigh.  I agree with your approach then.
If you can find one, perhaps add a link from a py dev saying "we won't take
this change because blah blah".

jrg


>
> If I use debug python, I'd have to use the debug versions of all the
> libraries
> as well -- .pyd, which is a little more than what we want, since you'd have
> to
> start using python_d.exe as well.
>
> README.chromium lives in the Cr src and is therefore in the other CL.
>
> Thanks for the quick reviews, John.
>
>
>
> http://codereview.chromium.org/661334
>

Powered by Google App Engine
This is Rietveld 408576698