amperka / ino

Command line toolkit for working with Arduino hardware
http://inotool.org
MIT License
1.08k stars 233 forks source link

Add package management / repository function to ino #188

Open joshvillbrandt opened 9 years ago

joshvillbrandt commented 9 years ago

It seems like the Arduino community is still lacking a package manager for libraries. I suggest adding a command like ino install _lib_ that is backed by a server somewhere. We can model the package description format and dependency handling off of Python's pip or Node's npm.

willprice commented 9 years ago

That'd be really handy, would it be possible to leverage some already existing package manager e.g. pip?

joshvillbrandt commented 9 years ago

I suppose this is possible. I'm not sure that is a good solution though. If we had to chose one, however, I'd nominate npm since it does a better job of creating isolated environments out of the box.

I suppose such an implementation would be pretty straight forward:

  1. the community creates ino-LIBNAME packages and adds them to npm
  2. documentation states dependency on Node and NPM and includes the install instruction: npm install
  3. a package.json file needs to be added with dependencies on ino-LIBNAME packages
  4. ino's build command needs to include the local node_modules folder in the path (I think this can be done with a command line option or similar with ino)
willprice commented 9 years ago

Why not just arduino- prefix instead of ino-, who knows, Arduino might even adopt it in the (very) distanct future!

What other solutions exist? We could roll (yet another) package manager, I'm personally opposed to this given that there are already so many of them. I suppose we could fork one instead to target arduino to avoid polluting other repositories, and set up a separate repository.

ivankravets commented 9 years ago

Guys, please look in to PlatformIO. It can manage your external libraries. See documentation.

PlatformIO uses library.json manifest file. Here are a few examples.

Finally, it has Library Registry with Web interface where you can search for new libraries.

willprice commented 9 years ago

Looks interesting, thanks for the link