Packaging and shipping a python library and scripts, the professional way

后端 未结 9 1388
执念已碎
执念已碎 2021-01-30 01:50

I have the task of packaging and shipping a commercial application bundle, which will include:

  1. a python library (developed by us)
  2. some python programs dep
9条回答
  •  隐瞒了意图╮
    2021-01-30 02:26

    You could use Makeself which is just like a tar.gz, but produces a .sh which self-extracts and allows for execution of a custom install script (don't ask me about Windows). This avoids bundling an installed Python which almost certainly won't work - you can include an installer instead.

    Your code and the dependencies developed by you should be included as packages created by sdist, which can be installed by PIP and easyinstall into a virtualenv based on your python. In your Manifest.in you can easily include only pyc files and everything else that is necessary and exclude py files so nobody sees your sources. Dependencies will be installed automatically by downloading them, but you can avoid that by including them in your archive, like your dependencies. Just put them into a directory and add "-f file:path_to_your_directory" to you PIP call.

提交回复
热议问题