Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'skip:` 10': 0.07; 'working:': 0.07; '#define': 0.09; '#undef': 0.09; 'setup.py': 0.09; 'to:addr:comp.lang.python': 0.09; 'library': 0.13; 'binary': 0.13; '"python': 0.15; 'honor': 0.15; 'config.h': 0.16; 'declaration': 0.16; 'install"': 0.16; 'modified.': 0.16; 'cc:addr :python-list': 0.16; 'looked': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'specify': 0.24; 'windows': 0.26; 'figure': 0.26; 'looks': 0.27; 'cc:addr:gmail.com': 0.28; 'made.': 0.29; 'worked': 0.29; 'installed': 0.29; 'cc:addr:python.org': 0.29; 'skip:p 30': 0.29; 'installer': 0.30; 'file.': 0.31; 'does': 0.32; "isn't": 0.33; 'there': 0.33; 'header:User-Agent:1': 0.33; 'file': 0.34; 'copied': 0.34; 'directory.': 0.34; 'option.': 0.34; 'copying': 0.35; 'install': 0.35; 'received:209.85.160': 0.36; 'cc:2**1': 0.36; 'created': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'subject:with': 0.37; 'received:209.85': 0.38; 'monday,': 0.38; 'files': 0.39; 'header': 0.39; 'received:209': 0.39; 'march': 0.61; 'below': 0.62; 'from:no real name:2**0': 0.64; 'received:209.85.160.184': 0.67; 'received:mail- gy0-f184.google.com': 0.67; 'taylor': 0.67; 'brand': 0.76; 'successful.': 0.93 Newsgroups: comp.lang.python Date: Mon, 12 Mar 2012 20:59:38 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.21.140.143; posting-account=0vXMwQoAAADCTO6LSb66apqOI0WiEK9C References: <35da69c3-edcc-4466-8a0d-70237c88af3b@qv4g2000pbc.googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: PyCrypto builds neither with MSVC nor MinGW From: casevh@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org, Case Van Horsen 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: , Message-ID: Lines: 48 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331611187 news.xs4all.nl 6874 [2001:888:2000:d::a6]:35541 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21553 On Monday, March 12, 2012 1:38:29 PM UTC-7, Alec Taylor wrote: > 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. >=20 > But it still isn't working: >=20 This was a little challenging. I looked through the setup.py to figure out = what assumptions their build process made. First, the file pycrypto-2.5\src= \inc-msvc\config.h must be modified. Below is the file I used: config.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D /* Define to 1 if you have the declaration of `mpz_powm', and to 0 if you don't. */ #define HAVE_DECL_MPZ_POWM 1 /* Define to 1 if you have the declaration of `mpz_powm_sec', and to 0 if y= ou don't. */ #define HAVE_DECL_MPZ_POWM_SEC 0 /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP /* Define to 1 if you have the `mpir' library (-lmpir). */ #define HAVE_LIBMPIR 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Although I was able to specify an include directory for mpir.h with -Ic:\us= r\include, I was not able specify a lib directory with -Lc:\usr\lib. It loo= ks like setup.py does not honor the -L option. So I finally gave up and jus= t copied the mpir.h file into my Python27\include directory and the mpir.li= b file into my Python27\libs directory.=20 After copying the files "python setup.py install" was successful. I created= a binary installer with "python setup.py bdist-wininst". There may be a cleaner way to build PyCrypto, but these steps worked for me= . casevh