如何使用py2app在32位旧Mac上编译64位Python库(例如SIP)?

时间:2022-12-28 07:10:57

I need to compile 64 bit libraries for Python (SIP for example) instead 32-bit, compiled by my old 32bit Mac for using to .app bandle at new Macs.

我需要为Python(例如SIP)编译64位库,而不是32位,由我的旧32位Mac编译,用于在新Mac上使用.app bandle。

Looks like similar question placed here Is it possible to compile a 64 bit executable on a 32 bit system under Ubuntu?

看起来像这里的类似问题是否有可能在Ubuntu下的32位系统上编译64位可执行文件?

but is looks like a very slow-tuning way, but I need a MANY libs to rebuild - by reason a creation a standalone application with py2app.

但看起来是一种非常慢调的方式,但我需要一个很多的库来重建 - 因为创建了一个带有py2app的独立应用程序。

All I found that downgrade this kind of process - from 64 to 32 like

所有我发现降级这种过程 - 从64到32就像

# python configure.py --arch=i386 -d /Library/Python/2.6/site-packages

From here http://www.oak-tree.us/blog/index.php/2009/05/12/pyqt-mac

从这里http://www.oak-tree.us/blog/index.php/2009/05/12/pyqt-mac

but

# python configure.py --arch=x86_64 -d /Library/Python/2.6/site-packages

at 32 bit system - would not helps - after replacing the sip.so in the app bundle to just-compiled file I get the same error "sip.so: mach-o, but wrong architecture"

在32位系统 - 没有帮助 - 在将应用程序包中的sip.so替换为刚刚编译的文件后,我得到了相同的错误“sip.so:mach-o,但是错误的架构”

Thanks for any assistance!

谢谢你的帮助!

1 个解决方案

#1


0  

You will need to rebuild your entire python distribution, including all the packages as 32 bit architecture. It might be easiest to do this on the old Mac you're developing for. It's not going to be fast, but it it is not complicated.

您将需要重建整个python发行版,包括32位架构的所有软件包。在您正在开发的旧Mac上执行此操作可能最简单。它不会很快,但它并不复杂。

#1


0  

You will need to rebuild your entire python distribution, including all the packages as 32 bit architecture. It might be easiest to do this on the old Mac you're developing for. It's not going to be fast, but it it is not complicated.

您将需要重建整个python发行版,包括32位架构的所有软件包。在您正在开发的旧Mac上执行此操作可能最简单。它不会很快,但它并不复杂。