5

I am thinking of a good way to ship my application which is a python package. Installing my package is easy making use of pythons distutils package.

The trouble comes with the dependencies my package relies on. If the dependencies are python packages I can deal with them easily again using distutils, but non python packages? Some of them even need a lot of care while building and installing them since very special compiler flags need to be set and so forth...

If I want to automate the installation procedure for the user what is the best way to go about it?

  1. Writing a make file that downloads and installs the dependencies
  2. Write a script that installs the dependencies
  3. No automation is best. simply write a manual that tells the user how to install the dependencies
  4. ???

Thx in advance for any answer or suggestion

Woltan
  • 13,723
  • 15
  • 78
  • 104
  • I'm voting to close this question as off-topic because it's some mix between Unclear, Too Broad, and Opinion-Based. There is no single "best" approach to installing dependencies that cannot be installed with Python's package manager. The best approach will depend on the specific target audience and the tools and knowledge you can assume will be available to them. – jpmc26 May 02 '19 at 22:45

2 Answers2

5

We have a project named Kivy ( http://kivy.org/ ), that have exactly the same issue. At the early stage, we've done a all-in-one package that include every setup of every dependencies. However the user was having a lot of "Next >" button to click... for every deps (Windows). So now, we have managed to take care ourself of the dependencies.

Except linux related (since all our deps are already packaged on "linux"), we have taken the approach of managing what we named "portable-deps" zipfile for each platform. And then, we have a script that:

  1. Download the portable-deps zip
  2. Include the latest version of our project
  3. Add launcher script in the root directory
  4. Zip the root directory, and rename the zip to project--.zip

With a special case for MacOSX, where the zip is a dmg with a little UI.

The good part is that the user don't have to care about deps, and developers know exactly what binaries are delivered with the project :)

For information, we have build_portable commands for distutils :

tito
  • 12,990
  • 1
  • 55
  • 75
4

The most important thing to help you decide is to consider your audience.

Are they technically-inclined and likely to be comfortable following instructions specifying how to build the dependencies themselves? If so, go with (3). If not, writing a python or shell script, or a makefile to automate the task may be the way to go. Pick whichever you feel most comfortable writing.

David
  • 316
  • 1
  • 4