Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38285

Re: Compiling native extensions with Visual Studio 2012?

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <wcdolphin@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.047
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'extension.': 0.09; 'subject:Visual': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr :python-list': 0.10; 'skip:p 40': 0.15; 'binaries': 0.16; 'manifest': 0.16; 'silly': 0.16; 'subject:Studio': 0.16; 'threads': 0.16; 'virtualenv.': 0.16; 'vs2010': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'basically': 0.17; 'url:moin': 0.17; 'thanks,': 0.18; 'windows': 0.19; 'changes': 0.20; 'skip:" 30': 0.20; 'written': 0.20; 'cc:2**0': 0.23; 'url:bugs': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'skip:" 20': 0.26; 'url:wiki': 0.26; '[1]': 0.27; '[2]': 0.27; 'besides': 0.27; 'errors.': 0.27; 'installed,': 0.29; 'definition': 0.29; 'url:python': 0.32; 'received:google.com': 0.34; 'fail': 0.35; 'subject:?': 0.35; "won't": 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'url:org': 0.36; '12,': 0.36; 'subject:with': 0.36; 'should': 0.36; 'two': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'skip:l 20': 0.38; 'url:en': 0.38; 'your': 0.60; 'from:no real name:2**0': 0.60; 'most': 0.61; 'charset:windows-1252': 0.65; 'ago.': 0.66; 'finally': 0.66; 'benefit': 0.70; 'url:search': 0.83; '2013': 0.84; 'alec': 0.84; 'url:cd': 0.84; 'url:clnk': 0.84; 'url:googleusercontent': 0.84; 'url:topic': 0.84; 'conflicts,': 0.91; 'url:cache': 0.93; 'url:ct': 0.93
X-Received by 10.182.155.70 with SMTP id vu6mr85281obb.39.1360163619762; Wed, 06 Feb 2013 07:13:39 -0800 (PST)
Newsgroups comp.lang.python
Date Wed, 6 Feb 2013 07:13:39 -0800 (PST)
In-Reply-To <mailman.438.1357976741.2939.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=208.91.53.154; posting-account=-J9qWgoAAADesM-7ncg-o0YKwcnbvgJp
References <mailman.438.1357976741.2939.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 208.91.53.154
MIME-Version 1.0
Subject Re: Compiling native extensions with Visual Studio 2012?
From wcdolphin@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding quoted-printable
Cc "comp.lang.python" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.1415.1360163628.2939.python-list@python.org> (permalink)
Lines 56
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1360163628 news.xs4all.nl 6969 [2001:888:2000:d::a6]:42758
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:38285

Show key headers only | View raw


On Saturday, January 12, 2013 2:45:38 AM UTC-5, Alec Taylor wrote:
> There have been various threads for MSVC 2010[1][2], but the most
> 
> recent thing I found for MSVC 2012 was [3]… from 6 months ago.
> 
> 
> 
> Basically I want to be able to compile bcrypt—and yes I should be
> 
> using Keccak—x64 binaries on Windows x64.
> 
> 
> 
> There are other packages also which I will benefit from, namely I
> 
> won't need to use the unofficial setup files and will finally be able
> 
> to use virtualenv.
> 
> 
> 
> So anyway, can I get an update on the status of MSVC 2010 and MSVC
> 
> 2012 compatibility?
> 
> 
> 
> Thanks,
> 
> 
> 
> Alec Taylor
> 
> 
> 
> [1] http://bugs.python.org/issue13210
> 
> [2] http://webcache.googleusercontent.com/search?q=cache:xPaU9mlCBNEJ:wiki.python.org/moin/VS2010+&cd=1&hl=en&ct=clnk
> 
> [3] https://groups.google.com/d/topic/dev-python/W1RpFhaOIGk

Besides the deep technicality of potential conflicts, two changes will allow you to compile your C extension. msvc9compiler.py is written only looking for VS2010, and even if you have vs2010 installed, it will still fail on Windows 7, Windows 8 with silly manifest errors.

The fix is simple:
In: Python27/Lib/distutils/msvc9compiler.py,
line#648 in definition of "link", before the call to "ld_args.append('/MANIFESTFILE:' + temp_manifest)",insert:
    ld_args.append('/MANIFEST')

line#178 in the definition of "get_build_version", insert:
    return 11.0

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Compiling native extensions with Visual Studio 2012? Alec Taylor <alec.taylor6@gmail.com> - 2013-01-12 18:45 +1100
  Re: Compiling native extensions with Visual Studio 2012? wcdolphin@gmail.com - 2013-02-06 07:13 -0800
  Re: Compiling native extensions with Visual Studio 2012? wcdolphin@gmail.com - 2013-02-06 07:13 -0800

csiph-web