Installing external package dependencies - where to put them?



If my package has an external dependency (a compiled python executable in this instance), any tips on where to put them? Building a package that whose underlying engine is a python executable. I’d like to be able to put it somewhere that I can get it at on linux/windows/mac machines, but not have to worry about the package upgrade process overwriting it since it’s not part of the core package.


This is a second editor plugin we’re working for Salesforce (the first being for Sublime Text). We’ve packaged the underlying functionality of the plugin into a python executable so we can quickly adapt it to other editors, let users run it from the command line, or wire it up to whatever else they can dream up.

We don’t want to include it directly in the package source so users can choose which version to install, or move it around to another location. So we’re downloading it when the package is first activated (or a newer version is available). However, I’m not sure where to put it. Initially I’d gone with putting it in our package home, but I’m assuming that will get wiped out when the package upgrades which I’d like to avoid (downloads are slow). Perhaps I should put it in a the root packages folder? But that still sounds like I’m asking to mess up packages somehow. Any suggestions?


I would suggest that the best “good citizen” place to put it would be inside your individual package directory. I would test it to see if it survives the upgrade process before even considering other options.

If it does, as you suspect, get wiped out when upgrading the package then I would consider the following:

  1. A new path under ~/.atom. I would probably call it ~/.atom/package-storage/my-package-name. Perhaps it could become a standard for such things :grinning:
  2. Somewhere else under the user’s home directory