wildducktheories / y2j

A command line tool for converting between YAML and JSON and vice versa.
MIT License
86 stars 13 forks source link

Docker-less installation packages #4

Open mcandre opened 8 years ago

mcandre commented 8 years ago

Could y2j publish a package for Homebrew, without using any containers, so that y2j has a more traditional install process for Mac users?

jonseymour commented 8 years ago

I'll have to read up on brew packaging, but sure.

chvostek commented 7 years ago

I'll +1 this as described in the issue subject. Stand-alone scripts would allow for easier use in FreeBSD, where docker is theoretically available as an add-on package, but may be unstable.

jonseymour commented 7 years ago

FWIW: I think if you grab the script y2j.sh and run it like this:

   y2j.sh installer | bash

should produce an installation that works without docker, provided python and the required dependency (the pip package - pyyaml) has been installed.

Not as a convenient as a OS specific package, for sure, but might work for some.

cesarjorgemartinez commented 7 years ago

Exist a pip package for this?

trinitronx commented 7 years ago

I have just created a Pull Request in Homebrew/homebrew-core#10927

jonseymour commented 7 years ago

@trinitronx Thanks for doing this.

trinitronx commented 7 years ago

@jonseymour, @mcandre, @chvostek: I've run into a bit of a snag trying to get this merged in Homebrew/homebrew-core#10927

I have created another Pull Request: Homebrew/homebrew-core#12532 to try and get this completed. Yet there are now higher bars being set by the Homebrew project (which I humbly disagreed with). I've done this in my free time because I feel that y2j is notable and useful, and sadly didn't have time to go through all review comments before the first PR was merged. Now there are more frustrating hoops to jump through. Feel free to comment, participate & give support on the upstream issue if you wish to see this merged. Thanks!

trinitronx commented 7 years ago

Looks like homebrew-core has gotten back to us on this. I'm cross-posting the response here from Homebrew/homebrew-core#12532 :

JCount commented: @trinitronx First, I apologize that we lost track of this.

However, we cannot accept new formulae that rely on a convoluted installation method involving string replacements because a standard one does not exist upstream. That means that upstream would need to construct a more ordinary method of installation that we could use before it would be worth anyone's time to work on constructing a formula for homebrew/core. Something like a setup.py that supports pip install would be a good example of such a method.

If upstream ends up making the necessary changes to support a more standard installation flow, please feel free to open a new PR.

So it looks like they want a standard installation method supported upstream from Homebrew. That would mean creating a standard way to install this here in this repo. So pip or other Homebrew-supported packaging method is probably the way to go if we want to be able to brew install y2j via the official channel.

almereyda commented 6 years ago

It is also preferable to run the script on the host system, since the image measures 265 MiB and is probably not worth the weight.

For most systems it seems the PyYAML dependency must be met, in so https://github.com/wildducktheories/y2j/blob/master/y2j.sh#L85 doesn't fail. The README could mention this.

Then a simple fix for a dockerless install is to replace all docker run ... invokations with exit 1 and a possible explanation of why a certain check would have failed.