From 8907e22e6664ec4e4ad2d82206644f9febddd1fa Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 6 Mar 2014 13:13:31 -0500 Subject: [PATCH] structure is flowing --- bob/__init__.py | 1 + bob/cli.py | 29 +++++++++++++++++++++++++++++ requirements.txt | 5 ++++- setup.py | 33 +++++++++++++++++++++++++++++++++ workspace/libraries/libffi | 18 ++++++++++++++++++ workspace/libraries/sqlite | 18 ++++++++++++++++++ workspace/runtimes/python-2.7.6 | 20 ++++++++++++++++++++ workspace/runtimes/python-3.3.4 | 21 +++++++++++++++++++++ 8 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 bob/__init__.py create mode 100644 bob/cli.py create mode 100644 setup.py create mode 100755 workspace/libraries/libffi create mode 100755 workspace/libraries/sqlite create mode 100755 workspace/runtimes/python-2.7.6 create mode 100755 workspace/runtimes/python-3.3.4 diff --git a/bob/__init__.py b/bob/__init__.py new file mode 100644 index 0000000..f00831f --- /dev/null +++ b/bob/__init__.py @@ -0,0 +1 @@ +from . import cli diff --git a/bob/cli.py b/bob/cli.py new file mode 100644 index 0000000..de60f2a --- /dev/null +++ b/bob/cli.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +"""Usage: bob [-vqrh] [FILE] ... + bob (--left | --right) CORRECTION FILE + +Process FILE and optionally apply correction to either left-hand side or +right-hand side. + +Arguments: + FILE optional input file + CORRECTION correction angle, needs FILE, --left or --right to be present + +Options: + -h --help + -v verbose mode + -q quiet mode + -r make report + --left use left-hand side + --right use right-hand side + +""" +from docopt import docopt + + +def dispatch(): + print 'welcome to bob!' + print + arguments = docopt(__doc__) + print(arguments) diff --git a/requirements.txt b/requirements.txt index 46c6eec..27e43ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,4 @@ -boto \ No newline at end of file +-e . +boto==2.26.1 +docopt==0.6.1 +wsgiref==0.1.2 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a4a61f1 --- /dev/null +++ b/setup.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import sys + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +deps = [ + 'boto', + 'docopt' +] + +setup( + name='bob', + version='0.0.1', + install_requires=deps, + description='Binary Build Toolkit.', + # long_description='Meh.',/ + author='Kenneth Reitz', + author_email='kenneth@heroku.com', + url='https://github.com/heroku/build-toolkit', + packages=['bob'], + # license='MIT', + entry_points={ + 'console_scripts': [ + 'bob = bob:cli.dispatch', + ], + } +) diff --git a/workspace/libraries/libffi b/workspace/libraries/libffi new file mode 100755 index 0000000..86cba69 --- /dev/null +++ b/workspace/libraries/libffi @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Usage: $ build.sh + +OUT_PREFIX=$1 +SOURCE_TARBALL='ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz' + +curl $SOURCE_TARBALL | tar xz +# jx +mv libffi-3.0.13 libffi + +cd libffi +./configure --prefix=$OUT_PREFIX +make +make install + +# Cleanup +cd .. +rm -fr libffi \ No newline at end of file diff --git a/workspace/libraries/sqlite b/workspace/libraries/sqlite new file mode 100755 index 0000000..e71f3ab --- /dev/null +++ b/workspace/libraries/sqlite @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Usage: $ build.sh + +OUT_PREFIX=$1 +SOURCE_TARBALL='http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz' + +curl $SOURCE_TARBALL | tar xz +# jx +mv sqlite-autoconf-3070900 sqlite + +cd sqlite +./configure --prefix=$OUT_PREFIX +make +make install + +# Cleanup +cd .. +rm -fr sqlite \ No newline at end of file diff --git a/workspace/runtimes/python-2.7.6 b/workspace/runtimes/python-2.7.6 new file mode 100755 index 0000000..a4952f4 --- /dev/null +++ b/workspace/runtimes/python-2.7.6 @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Options: + +OUT_PREFIX=$1 + +echo "Building SQLite..." +./parts/sqlite $OUT_PREFIX + +echo "Building Python..." +SOURCE_TARBALL='http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-2.7.6 src +cd src + +./configure --prefix=$OUT_PREFIX +make +make install + +cd .. +rm -fr src \ No newline at end of file diff --git a/workspace/runtimes/python-3.3.4 b/workspace/runtimes/python-3.3.4 new file mode 100755 index 0000000..70c9ce2 --- /dev/null +++ b/workspace/runtimes/python-3.3.4 @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Options: + +OUT_PREFIX=$1 + +echo "Building SQLite..." +./parts/sqlite $OUT_PREFIX + +echo "Building Python..." +SOURCE_TARBALL='http://python.org/ftp/python/3.3.4/Python-3.3.4.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-3.3.4 src +cd src + +./configure --prefix=$OUT_PREFIX +make +make install + +cd .. +rm -fr src +ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python \ No newline at end of file