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


Groups > comp.lang.python > #21546

Re: PyCrypto builds neither with MSVC nor MinGW

References (2 earlier) <35da69c3-edcc-4466-8a0d-70237c88af3b@qv4g2000pbc.googlegroups.com> <CAO+9iGdiBnoEUH=L7QemOjPm_d-5PQYiECUBqT86JX=LDLQ8UA@mail.gmail.com> <CANerV6mip=4q5ZJFu00g7wvSAV4cBk6soDTc+x=bHKfVWt+4ZQ@mail.gmail.com> <CAO+9iGfmMmLyRH-CXcToz0KuT_AAAiko=N0XNPPnxpfpTuXKrg@mail.gmail.com> <CANerV6kNxt1eM1pj=fAp_161q363iOxRQ7Wo_3pPTXumjqXRsw@mail.gmail.com>
Date 2012-03-13 07:38 +1100
Subject Re: PyCrypto builds neither with MSVC nor MinGW
From Alec Taylor <alec.taylor6@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.595.1331584711.3037.python-list@python.org> (permalink)

Show all headers | View raw


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._fastmath.

building 'Crypto.Random.OSRNG.winrandom' extension
Traceback (most recent call last):
  File "setup.py", line 452, in <module>
    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=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = 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 <casevh@gmail.com> wrote:
> On Wed, Feb 8, 2012 at 4:24 AM, Alec Taylor <alec.taylor6@gmail.com> wrote:
>> 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 library is
> statically linked into that DLL. Only the innvocation of setup.py should need
> to refer to the MPIR library locations.  I don't use pip so I'm not sure how to
> get pip to install the resulting DLL, etc.
>>
>> On Wed, Feb 8, 2012 at 9:48 PM, Case Van Horsen <casevh@gmail.com> wrote:
>>> On Tue, Feb 7, 2012 at 9:37 PM, Alec Taylor <alec.taylor6@gmail.com> wrote:
>>>> 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 library.
>>>>
>>>> Thanks for all suggestions,
>>>>
>>>> Alec Taylor

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


Thread

PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-02-06 01:40 +1100
  Re: PyCrypto builds neither with MSVC nor MinGW casevh <casevh@gmail.com> - 2012-02-06 15:27 -0800
    Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-02-08 16:37 +1100
    Re: PyCrypto builds neither with MSVC nor MinGW Case Van Horsen <casevh@gmail.com> - 2012-02-08 02:48 -0800
    Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-02-08 23:24 +1100
    Re: PyCrypto builds neither with MSVC nor MinGW Case Van Horsen <casevh@gmail.com> - 2012-02-08 04:31 -0800
    Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-03-13 07:38 +1100
      Re: PyCrypto builds neither with MSVC nor MinGW casevh@gmail.com - 2012-03-12 20:59 -0700
        Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-03-13 15:57 +1100
        Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-03-13 17:09 +1100
        Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-03-14 20:47 +1100
        Re: PyCrypto builds neither with MSVC nor MinGW bikewave <pmfenton33@gmail.com> - 2012-08-22 11:21 -0700
        Re: PyCrypto builds neither with MSVC nor MinGW Dave Angel <d@davea.name> - 2012-08-22 14:39 -0400
      Re: PyCrypto builds neither with MSVC nor MinGW casevh@gmail.com - 2012-03-12 20:59 -0700
    Re: PyCrypto builds neither with MSVC nor MinGW Alec Taylor <alec.taylor6@gmail.com> - 2012-03-13 08:21 +1100

csiph-web