Merge pull request #25 from orchardup/ship-binaries

Ship OS X binaries
This commit is contained in:
Aanand Prasad 2014-03-03 15:29:59 +00:00
commit e550451c69
8 changed files with 35 additions and 6 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/dist
/docs/_site
/docs/.git-gh-pages
fig.spec

View File

@ -1,9 +1,10 @@
FROM stackbrew/ubuntu:12.04
RUN apt-get update -qq
RUN apt-get install -y python python-pip
FROM orchardup/python:2.7
ADD requirements.txt /code/
WORKDIR /code/
RUN pip install -r requirements.txt
ADD requirements-dev.txt /code/
RUN pip install -r requirements-dev.txt
ADD . /code/
RUN useradd -d /home/user -m -s /bin/bash user
RUN chown -R user /code/
USER user

View File

@ -52,4 +52,10 @@ Running the test suite
$ script/test
Building OS X binaries
---------------------
$ script/build-osx
Note that this only works on Mountain Lion, not Mavericks, due to a [bug in PyInstaller](http://www.pyinstaller.org/ticket/807).

3
bin/fig Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env python
from fig.cli.main import main
main()

View File

@ -14,10 +14,18 @@ First, install Docker. If you're on OS X, you can use [docker-osx](https://githu
Docker has guides for [Ubuntu](http://docs.docker.io/en/latest/installation/ubuntulinux/) and [other platforms](http://docs.docker.io/en/latest/installation/) in their documentation.
Next, install Fig:
Next, install Fig. On OS X:
$ curl -L https://github.com/orchardup/fig/releases/download/0.3.0/darwin > /usr/local/bin/fig
$ chmod +x /usr/local/bin/fig
On 64-bit Linux:
$ curl -L https://github.com/orchardup/fig/releases/download/0.3.0/linux > /usr/local/bin/fig
$ chmod +x /usr/local/bin/fig
Fig is also available as a Python package if you're on another platform (or if you prefer that sort of thing):
$ sudo pip install -U fig
(This command also upgrades Fig when we release a new version. If you dont have pip installed, try `brew install python` or `apt-get install python-pip`.)
That should be all you need! Run `fig --version` to see if it worked.

View File

@ -1,2 +1,3 @@
mock==1.0.1
nose==1.3.0
pyinstaller==2.1

3
script/build-linux Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker build -t fig .
docker run -v `pwd`/dist:/code/dist fig pyinstaller -F bin/fig

6
script/build-osx Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -ex
virtualenv venv
venv/bin/pip install pyinstaller==2.1
venv/bin/pip install .
venv/bin/pyinstaller -F bin/fig