开发者

Deploying python app to Mac and Windows users

I've written an app in python that depends on wxPython and some other python libraries. I know about pyexe for making python scripts executable on Windows, but what would be the easiest way to share this with my Mac using friends who wouldn't know how to install the required dependencies? One option would be to bundle my dependencies in the same package, but that seems kind of clunky. How do people usually deploy such apps? For once I miss Java开发者_如何学运维...


You could check out py2app, which is similar to py2exe


How do people usually deploy such apps?

2 choices.

  1. With instructions.

  2. All bundled up.

You write simple instructions like this. Folks can follow these pretty reliably, unless they don't have enough privileges. Sometimes they need to sudo in linux environments.

  1. Download easy_install (or pip)

  2. easy_install this, easy_install that (or pip this, pip that)

  3. easy_install whatever package you wrote.

It works really well. If you download some Python packages you'll see this in action. Sphinx requires docutils. Django requires docutils and PIL. It works out really well to simply document the dependencies. Other folks seem to do it without serious problems. Follow their lead.

Bundling things up means you have to

(a) provide the entire original distribution (as required by most open source licenses)

(b) provide a compatible open source license with the licenses of the things you bundled. This can be easy if you depend on things that all of the same license. Otherwise, you basically can't redistribute them and have to resort to installation instructions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜