是否可以在 Mac App Store 上部署 Python 应用程序? [英] Is it possible to deploy a Python application on the Mac App Store?

查看:26
本文介绍了是否可以在 Mac App Store 上部署 Python 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apple 是否接受 Python 应用程序在新的 Mac App Store 上分发?

Does Apple accept Python applications for distribution on the new Mac App Store?

如果是这样,应用程序应该如何打包?py2app 够用吗?还有什么?

If so, how should the application be packaged? Is py2app sufficient? Something else?

推荐答案

我打包了 Pennywise,可在 Mac App Store 上获得.它基于 Virgil 的 moneyGuru,它使用 Python、PyObjC 和 py2app.

I packaged Pennywise, which is available on the Mac App Store. It's based on Virgil's moneyGuru, which uses Python, PyObjC, and py2app.

您必须遵循 Apple 准备提交给 Mac 的应用程序的流程应用商店.最重要的是,您需要将正确的键添加到 Info.plist 中,并删除任何自动更新机制,例如火花.这不是严格要求的,但您可能还想实施收据检查.使用 Xcode 将使提交过程更加容易.您可以查看 moneyGuru 源代码,了解如何使用 Xcode 作为构建的最后部分的示例过程.

You will have to follow Apple's process for preparing an application for submission to the Mac App Store. Most importantly, you will want to add the proper keys to your Info.plist, and remove any automatic updating mechanism, e.g. Sparkle. It's not strictly required, but you will probably also want to implement receipt checking. Using Xcode will make the submission process much easier. You can look at the moneyGuru source code for an example of how to use Xcode as the final part of the build process.

Py2app 在bundle 中嵌入了一份Python 框架的副本,所以不知道苹果是否会批准一个只链接到系统框架的应用程序.虽然主要二进制文件不支持 PPC,但 Apple 似乎没有检查嵌入式框架中二进制文件的架构.

Py2app embeds a copy of the Python framework in the bundle, so I don't know whether Apple would approve an application that only linked to the system framework. While the primary binary can't support PPC, Apple does not seem to check the architectures of binaries in embedded frameworks.

最后一个警告:我不建议在编写新应用程序时使用此过程.使用 Python、PyObjC 和 py2app 会使构建过程变得非常复杂并引入额外的依赖项.

One final caveat: I wouldn't recommend this process for writing new applications. Using Python, PyObjC, and py2app seriously complicates the build process and introduces additional dependencies.

这篇关于是否可以在 Mac App Store 上部署 Python 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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