bfg9000 icon indicating copy to clipboard operation
bfg9000 copied to clipboard

Provide OS packages for bfg

Open jimporter opened this issue 9 years ago • 16 comments

To make life easier for users, we should provide installable packages for bfg. While setuptools is helpful, users should be able to use their OS's packager. We want the following:

  • [ ] Linux
  • [ ] Windows (.exe): py2exe
    • [ ] Chocolatey
  • [ ] OS X ~~(.app)~~: ~~py2app~~
    • [ ] Homebrew

jimporter avatar Aug 25 '15 19:08 jimporter

For Windows, you still need an installer. There's a distutils plugin on PyPI for Inno Setup.

refi64 avatar Aug 25 '15 20:08 refi64

https://pypi.python.org/pypi/innosetup

It even works with py2exe.

There's also InnoPython, which I wrote, although I don't know if it works under Python 3.

refi64 avatar Aug 25 '15 20:08 refi64

Thanks, I added that to the summary. I'll have to decide if I want to support Python 3 eventually. Currently, it's Python 2.7 only, but there's a bfg9000_required_version that also lets you specify the required Python version, so I could see people eventually requiring Python 3 for their build.bfg files.

jimporter avatar Aug 26 '15 03:08 jimporter

Moving this to 0.2, since it's not really essential for a first version, and otherwise I'll never actually finish 0.1.

jimporter avatar Sep 28 '15 16:09 jimporter

@jimporter, if I could add a voice here, I'm a supporter of py3 over py2, for various reasons. I haven't seen many reasons why we couldn't support both, especially with the help of six.

nlhepler avatar Dec 28 '15 23:12 nlhepler

My only concern with supporting Py3 is that users who have bfg-with-py3 installed and try to build someone else's project made with bfg-with-py2 might run into issues. However, I'm probably going to support Py3 anyway. I think the only part I need to fix is eliminating basestring everywhere.

jimporter avatar Dec 28 '15 23:12 jimporter

That's a fair point, though I would also say that if anyone is doing something in their bfg files that's incompatible between py2 and py3 (at least w/o six), it's probably already brittle.. We could just make a large public recommendation that .bfg-authors be mindful of compatibility.

nlhepler avatar Dec 28 '15 23:12 nlhepler

On OS X you should probably package for homebrew; I don't see how a build file generator would work as a .app unless you added a GUI for it.

Homebrew have some pretty straightforward guidelines for packaging Python applications (including those that have dependencies) here: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Python-for-Formula-Authors.md

And here's a relatively small example formula that follows those guidelines, if you're curious: https://github.com/Oblong/homebrew-tools/blob/master/obi.rb

tomjakubowski avatar Jan 27 '16 22:01 tomjakubowski

You might also be able to build an installer package (.pkg), but I know nothing about that.

tomjakubowski avatar Jan 27 '16 22:01 tomjakubowski

That sounds like a good idea, thanks! I don't know much about OS X, aside from that I use Homebrew for installing crap for the CI builds for bfg. It seems like the de facto solution for this stuff. If there are other super-popular alternatives to Homebrew, I'll look into them too if someone points them out.

jimporter avatar Jan 30 '16 06:01 jimporter

I'm happy to volunteer time to work on packaging bfg9000 for Homebrew. I'll be in touch.

tomjakubowski avatar Feb 08 '16 23:02 tomjakubowski

Something you may not be aware of: https://github.com/jordansissel/fpm

(pretty funny that fpm doesn't dogfood and you have to gem install fpm to use it…)

tomjakubowski avatar Feb 18 '16 01:02 tomjakubowski

Hm, interesting. Python already handles .rpms and .debs pretty well, so I might not need that, but perhaps it would help for OS X...

jimporter avatar Feb 18 '16 07:02 jimporter

Ok, I now have working .debs and a PPA for Ubuntu: https://launchpad.net/~jimporter/+archive/ubuntu/testing

When I produce an actual release, I'll put all the necessary packages into a "stable" PPA.

jimporter avatar Jun 15 '16 09:06 jimporter

Oh also, if anyone has an opinion on how they'd like to see me distribute a Python 3-backed version of bfg, let me know. Right now, the bfg9000 package on my PPA is Python 2-backed, but I could add a bfg9000-python3 package. Or I could have bfg9000-python2 and bfg9000-python3 and then make a virtual bfg9000 package?

jimporter avatar Jun 15 '16 09:06 jimporter

Moving this out to 0.4 since I want to handle #48 before I get too far on this...

jimporter avatar Jan 26 '17 07:01 jimporter