Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'args': 0.05; 'compiler': 0.07; 'initialize': 0.07; 'statically': 0.07; 'suggestions,': 0.07; 'working:': 0.07; 'python': 0.08; '>>>>': 0.09; 'folder,': 0.09; 'setup.py': 0.09; 'valueerror:': 0.09; 'am,': 0.12; 'library': 0.13; 'skip:" 40': 0.15; 'skip:v 30': 0.15; '498,': 0.16; 'dll,': 0.16; 'dll.': 0.16; 'from:addr:alec.taylor6': 0.16; 'from:name:alec taylor': 0.16; 'horsen': 0.16; 'mkdir': 0.16; 'pip?': 0.16; 'sdk': 0.16; 'setup.py.': 0.16; 'cc:addr:python- list': 0.16; "wouldn't": 0.17; 'extension': 0.17; 'wed,': 0.17; 'wrote:': 0.18; '>>>': 0.18; 'thanks,': 0.19; '(most': 0.21; 'cc:no real name:2**0': 0.21; 'received:209.85.210.174': 0.21; 'received:mail-iy0-f174.google.com': 0.21; 'so.': 0.22; 'header :In-Reply-To:1': 0.22; 'assume': 0.22; 'feb': 0.22; 'unsure': 0.23; 'library.': 0.24; 'specify': 0.24; 'traceback': 0.24; 'windows': 0.26; 'cc:2**0': 0.26; 'asking': 0.28; 'raise': 0.28; 'skip:" 30': 0.28; "i'm": 0.28; 'message-id:@mail.gmail.com': 0.29; 'compile': 0.29; "skip:' 30": 0.29; 'installed': 0.29; 'cc:addr:python.org': 0.29; 'pm,': 0.29; 'install,': 0.30; 'omitted': 0.30; 'van': 0.30; 'skip:b 30': 0.31; "i've": 0.32; 'thanks': 0.32; 'does': 0.32; 'tue,': 0.32; "isn't": 0.33; 'there': 0.33; 'file': 0.34; '(including': 0.34; 'running': 0.34; 'builds': 0.34; 'dll': 0.34; 'last):': 0.34; 'probably': 0.35; 'however,': 0.35; 'install': 0.35; 'convenient': 0.37; 'run': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'subject:with': 0.37; 'received:209.85': 0.38; 'linked': 0.38; 'resulting': 0.38; 'think': 0.38; 'should': 0.38; 'files': 0.39; 'received:209': 0.39; 'setup': 0.40; 'your': 0.61; 'below': 0.62; 'below.': 0.64; 'taylor': 0.67; 'brand': 0.76; '11:31': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=mqu9ISQTxnY0ECS6KjB7xoGd5iLq4JfkZIOqlFzEsVM=; b=UzS28v8p1TdauQUvCQm0vR3leWU/ltt7+9PGybAGlmI/YkkneRKNoC0KBBbdXRRNw/ O7vyk/eRWLIO5J3/+6k/90zv3JsClveKLgAW6dPoO1rK4I5oB5RK2A8NDkh7+6aDulLy pBQxdp8r3ajvKUgkLuw3o5pcdExkVPQPwVL9+MVEg82MryJ5prdC40wOcEyccaw5uuoH eojxItNZ5A6hJm/8vDQwTGRzAlrqGSKYseHfpCpLe9cuk+B1ZlLXzcpJRbenJUYE+h0v i6fRC7Pr+M5I2zzeznMJBlDLey9/mHTNOaKcpSGcSoa6KBxoPmHfYtzNAKcCgJSEwlrT BbIQ== MIME-Version: 1.0 In-Reply-To: References: <35da69c3-edcc-4466-8a0d-70237c88af3b@qv4g2000pbc.googlegroups.com> Date: Tue, 13 Mar 2012 07:38:29 +1100 Subject: Re: PyCrypto builds neither with MSVC nor MinGW From: Alec Taylor To: Case Van Horsen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 92 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331584712 news.xs4all.nl 6938 [2001:888:2000:d::a6]:46201 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21546 On a brand new Windows install now, with a brand new VS8 installed with new YASM and MPIR in c:\usr\src\include and c:\usr\src\lib. But it still isn't working: C:\workingdir\pycrypto>python setup.py build_ext -Ic:\usr\src\include -Lc:\usr\src\lib install running build_ext warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fast= math. building 'Crypto.Random.OSRNG.winrandom' extension Traceback (most recent call last): File "setup.py", line 452, in core.setup(**kw) File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 249, in run build_ext.run(self) File "C:\Python27\lib\distutils\command\build_ext.py", line 339, in run self.build_extensions() File "setup.py", line 146, in build_extensions build_ext.build_extensions(self) File "C:\Python27\lib\distutils\command\build_ext.py", line 448, in build_extensions self.build_extension(ext) File "C:\Python27\lib\distutils\command\build_ext.py", line 498, in build_extension depends=3Dext.depends) File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile self.initialize() File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initializ= e vc_env =3D query_vcvarsall(VERSION, plat_spec) File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: [u'path'] On Wed, Feb 8, 2012 at 11:31 PM, Case Van Horsen wrote: > On Wed, Feb 8, 2012 at 4:24 AM, Alec Taylor wrot= e: >> Thanks, but to get it to work with pip, wouldn't I need to add it to >> PATH? - Or can I just add those library args to pip? > I don't think so. pyCrypto probably builds a single DLL so the MPIR libra= ry is > statically linked into that DLL. Only the innvocation of setup.py should = need > to refer to the MPIR library locations. =A0I don't use pip so I'm not sur= e how to > get pip to install the resulting DLL, etc. >> >> On Wed, Feb 8, 2012 at 9:48 PM, Case Van Horsen wrote= : >>> On Tue, Feb 7, 2012 at 9:37 PM, Alec Taylor wr= ote: >>>> Thanks all for your replies. >>>> >>>> I have now installed MSVC8 and YASM. >>> I assume you installed Visual Studio. I've omitted the commands to use >>> the SDK compiler below. >>>> >>>> I was able to successfully run configure.bat and make.bat (including >>>> make.bat check). >>>> >>>> However, I'm unsure what to do about install, since there is no >>>> install arg. Do I copy it across to my VC\bin folder, or does it need >>>> it's own place in PATH + system variables? >>> >>> The following is just a guess. >>> >>> I copy the files to a convenient location and then specify that >>> location to setup.py. Below is an excerpt from my build process. >>> >>> mkdir c:\src\lib >>> mkdir c:\src\include >>> xcopy /Y mpir.h c:\src\include\*.* >>> xcopy /Y win\mpir.lib c:\src\lib\*.* >>> >>> python setup.py build_ext -Ic:\src\include -Lc:\src\lib install >>> >>>> >>>> I am asking because I don't know where it is looking for the MPIR libr= ary. >>>> >>>> Thanks for all suggestions, >>>> >>>> Alec Taylor