m2crypto:python 2.7兼容性以及要使用哪个版本的OpenSSL? [英] m2crypto: python 2.7 compatibility and which version of OpenSSL to use?

查看:177
本文介绍了m2crypto:python 2.7兼容性以及要使用哪个版本的OpenSSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我们一直在将M2crypto与适用于Windows(32位)的Python 2.6结合使用,并取得了巨大的成功.我们使用了一种用户贡献的设置来在我们的开发环境中安装M2crypto.我们想转到Python 2.7,但是注意到没有针对m2crypto的预构建Python 2.7设置.

We've been using M2crypto with Python 2.6 for Windows (32-bit) for some time with great success. We used one of the user contributed setups to install M2crypto in our development environments. We would like to move to Python 2.7, but noticed there are no pre-built Python 2.7 setups for m2crypto.

问题:

  1. M2crypto 0.20.2是否与Python 2.7兼容,或者如果我们想继续使用此库,我们应该保留在Python 2.6上吗?

  1. Is M2crypto 0.20.2 compatible with Python 2.7 or should we remain at Python 2.6 if we want to continue to use this library?

是否有人为在python 2.7环境中安装M2Crypto 0.20.2的用户建立了安装程序? (M2crypto网站上没有2.7项贡献,谷歌也显示为空)

Does anyone have a user built setup for installing M2Crypto 0.20.2 in a Python 2.7 environment? (There are no 2.7 contributions on the M2crypto site and google comes up empty as well)

我们可以将Python 2.6 M2Crypto文件(在lib \ site-packages \ M2Crypto下)复制到Python 2.7安装程序中的同一位置,并避免正式的安装过程吗?

Can we copy our Python 2.6 M2Crypto files (under lib\site-packages\M2Crypto) to the same place in our Python 2.7 setup and avoid a formal installation process?

我们应在M2crypto 0.20.2中使用哪个版本的OpenSLL?我检查了OpenSSL网站,发现有两个版本的OpenSSL:0.9.8和1.0.0a.

What version of OpenSLL should we use with M2crypto 0.20.2? I checked the OpenSSL website and there appear 2 versions of OpenSSL to choose from: 0.9.8 and 1.0.0a.

谢谢你, 马尔科姆

推荐答案

  1. 是的,它与Python 2.7兼容,因此如果尚未升级,则可以自由升级.
  2. 是的,在这里,对于我使用MSVS2008为Python 2.7构建的M2Crypto 20.2,您拥有bdist_wininstbdist_eggbdist,希望它能满足您的需求.
  3. 不,您将收到导入错误,因为.pyd文件(实际上是DLL)在导入表中包含python26.dll,因此将无法使用.当然,您可以修改它,并用python27替换python26,但这实在太脏了,不能保证它会一直工作.
  4. 我为您上传的版本可以在OpenSSL 0.9.8o上正常运行,尚未在1.0.0上进行过测试.
  1. Yes, it's compatible with Python 2.7, so you can freely upgrade if you have not already.
  2. Yes, here you have bdist_wininst, bdist_egg and bdist for M2Crypto 20.2 built for Python 2.7 with MSVS2008 by me, hope it will fit your needs.
  3. No, you will get import error, as .pyd file (which is actually DLL) has python26.dll in it's import table, so this will not work. Of course, you can hack it and replace python26 with python27, but that's too dirt and gives you no guarantee it will work all the time.
  4. Version I uploaded for you works fine with OpenSSL 0.9.8o, haven't tested it with 1.0.0.

这篇关于m2crypto:python 2.7兼容性以及要使用哪个版本的OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆