Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distributing a large Python-enabled application: best practices

There is a large Python application that consists of numerous third-party packages and binary libraries. Here is an overview of my requirements:

  • Cross-platform (currently Windows and modern Linux distributions)
  • Installing lots (say >100 MB) of binary libraries (DLLs on Windows)
  • Installing third-party Python packages (some of them cannot be installed on Windows using tools like easy_install)
  • Installing Visual Studio redistributable package it needed
  • Preserving file layout for my package if possible (no compressed eggs)
  • A clear way to remove all packages and libraries
  • Distribute test suite (py.test in my case)
  • Option for no-source distribution (.pyc-only)

The application should be "portable" at least as a Python package (can be installed anywhere using VirtualEnv).

What are my choices? Should I just stick with setuptools (distribute)? Should I roll out custom installer?

The application being developed is proprietary, but it provides Python API for developers, and I want it to look and feel as pythonish and hackerish as possible.

like image 518
Andrew T Avatar asked Sep 15 '11 08:09

Andrew T


People also ask

How do I distribute my Python application?

The most convenient way to deliver a Python application to a user is to provide them with an executable—either a single file or a directory with an easily identified executable somewhere in it.

How do I make a Python script distributable?

You can use a tool like PyInstaller to convert your script (. py file) into an executable (.exe on windows). The way that works is PyInstaller copies both the python interpretor and your script into a single file so that you can distribuite your program easily.


1 Answers

Py2Exe can done most of the prerequisites, and dependencies, to remove and additional install/uninstall you could use any msi installer creator.

like image 143
waldecir Avatar answered Oct 03 '22 20:10

waldecir