Commits

Ginés Martínez Sánchez committed 7f982c2 Draft

added banco example

Comments (0)

Files changed (23)

ginsfsm/examples/inter_event/banco/CHANGES.txt

+0.0.0
+-----
+
+-  Initial version

ginsfsm/examples/inter_event/banco/MANIFEST.in

+prune .hg
+exclude push.sh
+include *.txt *.ini *.cfg *.rst
+recursive-include banco *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml

ginsfsm/examples/inter_event/banco/README.rst

+banco
+=====
+
+License
+-------
+
+Copyright (c) 2013
+
+banco is released under terms of The MIT
+License MIT <http://www.opensource.org/licenses/mit-license>.
+
+Authors
+-------
+
+Your name

ginsfsm/examples/inter_event/banco/banco.ini

+[composite:main]
+use = call:ginsfsm.gaplic:gaplic_factory
+main = wsgi-server
+wsgi = wsgi-application
+
+[app:wsgi-server]
+use = egg:banco#main
+gaplic_name = main_gaplic
+application = wsgi-application
+GWsgiServer.host = 0.0.0.0
+GWsgiServer.port = 8000
+GSock.trace_dump = true
+GObj.trace_mach = true
+GObj.trace_creation = false
+
+PyramidRoot.pyramid_router_url = __pyramid_router__
+GRouter.trace_router = true
+
+
+[app:wsgi-application]
+use = egg:banco#pyramid_app
+gaplic = main_gaplic
+
+pyramid.reload_templates = true
+pyramid.debug_authorization = true
+pyramid.debug_notfound = false
+pyramid.debug_routematch = false
+pyramid.debug_templates = true
+pyramid.default_locale_name = en
+
+
+# Begin logging configuration
+
+[loggers]
+keys = root, ginsfsm
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = DEBUG
+handlers = console
+
+[logger_ginsfsm]
+level = DEBUG
+handlers =
+qualname = ginsfsm
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(message)s
+
+# End logging configuration

ginsfsm/examples/inter_event/banco/banco/__init__.py

+# -*- encoding: utf-8 -*-
+
+__version__ = '0.0.0'

ginsfsm/examples/inter_event/banco/banco/main.py

+# -*- encoding: utf-8 -*-
+"""
+banco
+=====
+
+It uses :class:`ginsfsm.protocols.wsgi.server.c_wsgi_server.GWsgiServer`.
+
+.. autofunction:: main
+
+"""
+
+from ginsfsm.gaplic import GAplic
+from ginsfsm.globals import (
+    set_global_app,
+    set_global_main_gaplic,
+)
+from ginsfsm.protocols.wsgi.server.c_wsgi_server import GWsgiServer
+from banco.pyramid_app import pyramid_wsgi_app
+
+
+#===============================================================
+#       Paste app's factory.
+#       To run with gserve banco.ini
+#===============================================================
+def pyramid_paste_factory(global_config, **local_conf):
+    """ Returns the applic10 WSGI application.
+    """
+    return pyramid_wsgi_app(global_config, **local_conf)
+
+
+#===============================================================
+#                   Main
+#===============================================================
+def main(global_config, **local_conf):
+    """ Entry point to run with gserve (PasteDeploy)
+    """
+    if 'application' in local_conf:
+        application = local_conf.pop('application')
+    else:
+        raise Exception('You must supply a wsgi application in local_conf.')
+
+    if 'gaplic_name' in local_conf:
+        gaplic_name = local_conf.pop('gaplic_name')
+    else:
+        raise Exception('You must supply a gaplic name in local_conf.')
+
+    ga = GAplic(gaplic_name, **local_conf)
+    set_global_main_gaplic(ga)
+    ga.create_gobj(
+        'wsgi_server',
+        GWsgiServer,
+        ga,
+        application=application,
+    )
+    return ga
+
+
+if __name__ == "__main__":
+    """ You can run directly this file as main, without gserve.
+    """
+    import logging
+    logging.basicConfig(level=logging.DEBUG)
+
+    # simulate running from ini file
+    local_conf = {
+        'gaplic_name': 'main_gaplic',
+        'application': 'wsgi-application',
+        'GWsgiServer.host': '0.0.0.0',
+        'GWsgiServer.port': 8000,
+        'GSock.trace_dump': True,
+        'GObj.trace_mach': True,
+        'GObj.trace_creation': False,
+        'GObj.logger': logging,
+        'PyramidRoot.pyramid_router_url': '__pyramid_router__',
+        'GRouter.trace_router': True,
+    }
+
+    ga = main({}, **local_conf)
+
+    pyramid_settings = {
+        'gaplic': 'main_gaplic',
+        'pyramid.reload_templates': True,
+        'pyramid.debug_authorization': False,
+        'pyramid.debug_notfound': False,
+        'pyramid.debug_routematch': False,
+        'pyramid.debug_templates': True,
+        'pyramid.default_locale_name': 'en',
+    }
+
+    set_global_app(
+        'wsgi-application',
+        pyramid_paste_factory({}, **pyramid_settings)
+    )
+
+    try:
+        ga.start()
+    except (KeyboardInterrupt, SystemExit):
+        print('Program stopped')

ginsfsm/examples/inter_event/banco/banco/pyramid_app/__init__.py

+# -*- encoding: utf-8 -*-
+"""
+Pyramid App
+===========
+
+"""
+from pyramid.config import Configurator
+
+from ginsfsm.globals import get_global_app
+
+from banco.pyramid_app.pyramid_root import PyramidRoot
+
+
+#-------------------------------------------------#
+#       Paste entry point
+#       Pyramid wsgi-app configuration
+#-------------------------------------------------#
+def pyramid_wsgi_app(global_config, **local_conf):
+    """ Returns a WSGI application.
+    """
+    if 'gaplic' in local_conf:
+        gaplic_name = local_conf.pop('gaplic')
+    else:
+        raise Exception('You must supply a gaplic name in ini file.')
+
+    gaplic = get_global_app(gaplic_name)
+    if not gaplic:
+        raise Exception("gaplic '%s' supplied for wsgi is invalid" %
+                        gaplic_name)
+
+    config = Configurator(
+        root_factory=get_root,
+        settings=local_conf,
+    )
+    config.add_static_view(
+        'static',
+        'banco:pyramid_app/static',
+        cache_max_age=3600
+    )
+
+    # Set up views
+    config.scan("banco.pyramid_app")
+
+    # Now we have the gaplic and the config for make the root
+    make_root(gaplic, config)
+
+    return config.make_wsgi_app()
+
+
+#----------------------------------------------------------------------#
+#                           Pyramid root
+#----------------------------------------------------------------------#
+app_root = None
+
+
+def make_root(gaplic, config):
+    global app_root
+    if app_root is not None:
+        return app_root
+
+    app_root = gaplic.create_gobj(
+        'pyramid-root',
+        PyramidRoot,
+        gaplic,
+        pyramid_config=config
+    )
+    return app_root
+
+
+def get_root(request):
+    return app_root

ginsfsm/examples/inter_event/banco/banco/pyramid_app/pyramid_root.py

+# -*- encoding: utf-8 -*-
+"""
+applic10
+=======
+
+Applic 10
+
+"""
+from pyramid.response import Response
+from pyramid.view import view_config
+from pyramid.security import (
+    Allow,
+    Authenticated,
+    Everyone,
+    DENY_ALL,
+)
+
+from ginsfsm.gobj import GObj
+from ginsfsm.c_timer import GTimer
+
+
+#----------------------------------------------------------------------#
+#                           Applic1
+#----------------------------------------------------------------------#
+
+#-------------------------------------------#
+#               Actions
+#-------------------------------------------#
+def ac_timeout(self, event):
+    self.config.counter += 1
+    self.send_event(self.timer, 'EV_SET_TIMER', seconds=self.config.seconds)
+
+
+PYRAMIDROOT_FSM = {
+    'event_list': (
+        'EV_SET_TIMER: bottom output',
+        'EV_TIMEOUT: bottom input',
+    ),
+    'state_list': (
+        'ST_IDLE',
+    ),
+    'machine': {
+        'ST_IDLE':
+        (
+            ('EV_TIMEOUT', ac_timeout, 'ST_IDLE'),
+        ),
+    }
+}
+
+PYRAMIDROOT_GCONFIG = {
+    'pyramid_router_url': [
+        str, '', 0, None,
+        'pyramid url to start the router'
+    ],
+    'seconds': [int, 60, 0, None, "Timer to increment the counter."],
+    'counter': [int, 0, 0, None, "Counter to display."],
+}
+
+
+class PyramidRoot(GObj):
+    """  Root resource (/)
+
+    .. ginsfsm::
+       :fsm: PYRAMIDROOT_FSM
+       :gconfig: PYRAMIDROOT_GCONFIG
+
+    *Input-Events:*
+        * :attr:`'EV_TIMEOUT'`: Timer over.
+
+    """
+    __acl__ = [
+        (Allow, Everyone, 'view'),
+        (DENY_ALL),
+    ]
+
+    def __init__(self):
+        GObj.__init__(self, PYRAMIDROOT_FSM, PYRAMIDROOT_GCONFIG)
+
+    def start_up(self):
+        """ Initialization zone.
+        """
+        if self.config.pyramid_router_url:
+            self.gaplic.start_up_router(
+                pyramid_router_url=self.config.pyramid_router_url,
+                pyramid_root=self
+            )
+
+        self.timer = self.create_gobj(
+            None,       # unnamed gobj
+            GTimer,     # gclass
+            self        # parent
+        )
+        self.send_event(self.timer, 'EV_SET_TIMER', seconds=self.config.seconds)
+
+
+#-------------------------------------------#
+#               Views
+#-------------------------------------------#
+@view_config(
+    context=PyramidRoot,
+    permission='view',
+    renderer='templates/mytemplate.pt')
+def default_view(self, request):
+    return {'project': 'banco'}

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/favicon.ico

Binary file added.

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/footerbg.png

Added
New image

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/headerbg.png

Added
New image

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/ie6.css

+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/middlebg.png

Added
New image

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/pylons.css

+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td
+{
+  margin: 0;
+  padding: 0;
+  border: 0;
+  outline: 0;
+  font-size: 100%; /* 16px */
+  vertical-align: baseline;
+  background: transparent;
+}
+
+body
+{
+  line-height: 1;
+}
+
+ol, ul
+{
+  list-style: none;
+}
+
+blockquote, q
+{
+  quotes: none;
+}
+
+blockquote:before, blockquote:after, q:before, q:after
+{
+  content: '';
+  content: none;
+}
+
+:focus
+{
+  outline: 0;
+}
+
+ins
+{
+  text-decoration: none;
+}
+
+del
+{
+  text-decoration: line-through;
+}
+
+table
+{
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+sub
+{
+  vertical-align: sub;
+  font-size: smaller;
+  line-height: normal;
+}
+
+sup
+{
+  vertical-align: super;
+  font-size: smaller;
+  line-height: normal;
+}
+
+ul, menu, dir
+{
+  display: block;
+  list-style-type: disc;
+  margin: 1em 0;
+  padding-left: 40px;
+}
+
+ol
+{
+  display: block;
+  list-style-type: decimal-leading-zero;
+  margin: 1em 0;
+  padding-left: 40px;
+}
+
+li
+{
+  display: list-item;
+}
+
+ul ul, ul ol, ul dir, ul menu, ul dl, ol ul, ol ol, ol dir, ol menu, ol dl, dir ul, dir ol, dir dir, dir menu, dir dl, menu ul, menu ol, menu dir, menu menu, menu dl, dl ul, dl ol, dl dir, dl menu, dl dl
+{
+  margin-top: 0;
+  margin-bottom: 0;
+}
+
+ol ul, ul ul, menu ul, dir ul, ol menu, ul menu, menu menu, dir menu, ol dir, ul dir, menu dir, dir dir
+{
+  list-style-type: circle;
+}
+
+ol ol ul, ol ul ul, ol menu ul, ol dir ul, ol ol menu, ol ul menu, ol menu menu, ol dir menu, ol ol dir, ol ul dir, ol menu dir, ol dir dir, ul ol ul, ul ul ul, ul menu ul, ul dir ul, ul ol menu, ul ul menu, ul menu menu, ul dir menu, ul ol dir, ul ul dir, ul menu dir, ul dir dir, menu ol ul, menu ul ul, menu menu ul, menu dir ul, menu ol menu, menu ul menu, menu menu menu, menu dir menu, menu ol dir, menu ul dir, menu menu dir, menu dir dir, dir ol ul, dir ul ul, dir menu ul, dir dir ul, dir ol menu, dir ul menu, dir menu menu, dir dir menu, dir ol dir, dir ul dir, dir menu dir, dir dir dir
+{
+  list-style-type: square;
+}
+
+.hidden
+{
+  display: none;
+}
+
+p
+{
+  line-height: 1.5em;
+}
+
+h1
+{
+  font-size: 1.75em;
+  line-height: 1.7em;
+  font-family: helvetica, verdana;
+}
+
+h2
+{
+  font-size: 1.5em;
+  line-height: 1.7em;
+  font-family: helvetica, verdana;
+}
+
+h3
+{
+  font-size: 1.25em;
+  line-height: 1.7em;
+  font-family: helvetica, verdana;
+}
+
+h4
+{
+  font-size: 1em;
+  line-height: 1.7em;
+  font-family: helvetica, verdana;
+}
+
+html, body
+{
+  width: 100%;
+  height: 100%;
+}
+
+body
+{
+  margin: 0;
+  padding: 0;
+  background-color: #fff;
+  position: relative;
+  font: 16px/24px NobileRegular, "Lucida Grande", Lucida, Verdana, sans-serif;
+}
+
+a
+{
+  color: #1b61d6;
+  text-decoration: none;
+}
+
+a:hover
+{
+  color: #e88f00;
+  text-decoration: underline;
+}
+
+body h1, body h2, body h3, body h4, body h5, body h6
+{
+  font-family: NeutonRegular, "Lucida Grande", Lucida, Verdana, sans-serif;
+  font-weight: 400;
+  color: #373839;
+  font-style: normal;
+}
+
+#wrap
+{
+  min-height: 100%;
+}
+
+#header, #footer
+{
+  width: 100%;
+  color: #fff;
+  height: 40px;
+  position: absolute;
+  text-align: center;
+  line-height: 40px;
+  overflow: hidden;
+  font-size: 12px;
+  vertical-align: middle;
+}
+
+#header
+{
+  background: #000;
+  top: 0;
+  font-size: 14px;
+}
+
+#footer
+{
+  bottom: 0;
+  background: #000 url(footerbg.png) repeat-x 0 top;
+  position: relative;
+  margin-top: -40px;
+  clear: both;
+}
+
+.header, .footer
+{
+  width: 750px;
+  margin-right: auto;
+  margin-left: auto;
+}
+
+.wrapper
+{
+  width: 100%;
+}
+
+#top, #top-small, #bottom
+{
+  width: 100%;
+}
+
+#top
+{
+  color: #000;
+  height: 230px;
+  background: #fff url(headerbg.png) repeat-x 0 top;
+  position: relative;
+}
+
+#top-small
+{
+  color: #000;
+  height: 60px;
+  background: #fff url(headerbg.png) repeat-x 0 top;
+  position: relative;
+}
+
+#bottom
+{
+  color: #222;
+  background-color: #fff;
+}
+
+.top, .top-small, .middle, .bottom
+{
+  width: 750px;
+  margin-right: auto;
+  margin-left: auto;
+}
+
+.top
+{
+  padding-top: 40px;
+}
+
+.top-small
+{
+  padding-top: 10px;
+}
+
+#middle
+{
+  width: 100%;
+  height: 100px;
+  background: url(middlebg.png) repeat-x;
+  border-top: 2px solid #fff;
+  border-bottom: 2px solid #b2b2b2;
+}
+
+.app-welcome
+{
+  margin-top: 25px;
+}
+
+.app-name
+{
+  color: #000;
+  font-weight: 700;
+}
+
+.bottom
+{
+  padding-top: 50px;
+}
+
+#left
+{
+  width: 350px;
+  float: left;
+  padding-right: 25px;
+}
+
+#right
+{
+  width: 350px;
+  float: right;
+  padding-left: 25px;
+}
+
+.align-left
+{
+  text-align: left;
+}
+
+.align-right
+{
+  text-align: right;
+}
+
+.align-center
+{
+  text-align: center;
+}
+
+ul.links
+{
+  margin: 0;
+  padding: 0;
+}
+
+ul.links li
+{
+  list-style-type: none;
+  font-size: 14px;
+}
+
+form
+{
+  border-style: none;
+}
+
+fieldset
+{
+  border-style: none;
+}
+
+input
+{
+  color: #222;
+  border: 1px solid #ccc;
+  font-family: sans-serif;
+  font-size: 12px;
+  line-height: 16px;
+}
+
+input[type=text], input[type=password]
+{
+  width: 205px;
+}
+
+input[type=submit]
+{
+  background-color: #ddd;
+  font-weight: 700;
+}
+
+/*Opera Fix*/
+body:before
+{
+  content: "";
+  height: 100%;
+  float: left;
+  width: 0;
+  margin-top: -32767px;
+}

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/pyramid-small.png

Added
New image

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/pyramid.png

Added
New image

ginsfsm/examples/inter_event/banco/banco/pyramid_app/static/transparent.gif

Added
New image

ginsfsm/examples/inter_event/banco/banco/pyramid_app/templates/mytemplate.pt

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal">
+<head>
+  <title>The Pyramid Web Application Development Framework</title>
+  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+  <meta name="keywords" content="python web application" />
+  <meta name="description" content="pyramid web application" />
+  <link rel="shortcut icon" href="${request.static_url('banco:pyramid_app/static/favicon.ico')}" />
+  <link rel="stylesheet" href="${request.static_url('banco:pyramid_app/static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+  <link rel="stylesheet" href="http://static.pylonsproject.org/fonts/nobile/stylesheet.css" media="screen" />
+  <link rel="stylesheet" href="http://static.pylonsproject.org/fonts/neuton/stylesheet.css" media="screen" />
+  <!--[if lte IE 6]>
+  <link rel="stylesheet" href="${request.static_url('banco:pyramid_app/static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
+  <![endif]-->
+</head>
+<body>
+  <div id="wrap">
+    <div id="top">
+      <div class="top align-center">
+          <div><img src="${request.static_url('banco:pyramid_app/static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+      </div>
+    </div>
+    <div id="middle">
+      <div class="middle align-center">
+        <p class="app-welcome">
+          Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
+          the Pyramid web application development framework.
+        </p>
+      </div>
+    </div>
+    <div id="bottom">
+      <div class="bottom">
+        <div id="left" class="align-right">
+          <h2>Search documentation</h2>
+          <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/search.html">
+                <input type="text" id="q" name="q" value="" />
+                <input type="submit" id="x" value="Go" />
+            </form>
+        </div>
+        <div id="right" class="align-left">
+          <h2>Pyramid links</h2>
+          <ul class="links">
+            <li>
+              <a href="http://pylonsproject.org">Pylons Website</a>
+            </li>
+            <li>
+              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#narrative-documentation">Narrative Documentation</a>
+            </li>
+            <li>
+              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#reference-material">API Documentation</a>
+            </li>
+            <li>
+              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#tutorials">Tutorials</a>
+            </li>
+            <li>
+              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#detailed-change-history">Change History</a>
+            </li>
+            <li>
+              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#sample-applications">Sample Applications</a>
+            </li>
+            <li>
+              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#support-and-development">Support and Development</a>
+            </li>
+            <li>
+              <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
+            </li>
+            </ul>
+        </div>
+      </div>
+    </div>
+  </div>
+  <div id="footer">
+    <div class="footer">&copy; Copyright 2008-2012, Agendaless Consulting.</div>
+  </div>
+</body>
+</html>

ginsfsm/examples/inter_event/banco/docs/DejaVuSans.ttf

Binary file added.

ginsfsm/examples/inter_event/banco/docs/README.txt

+Create a sphinx project
+=======================
+
+To build the documentation you must create a sphinx project in this directory
+with the 'sphinx-quickstart' command, with 'autodoc' extension enabled.
+I like the 'viewcode' extension too.
+
+
+Include the sphinx extensions
+=============================
+
+In order to build the ginsfsm documentation with svg graphics of smachine
+you must too add the extension 'ginsfsm.sphinxext' to the created conf.py file.
+
+The final result can be:
+
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'ginsfsm.sphinxext']
+
+
+Include the generated rst file
+==============================
+
+You must include the generated api_xxx.rst in the Contents of index.rst:
+
+.. toctree::
+   :maxdepth: 2
+
+   api_xxx
+
+being xxx the name of the created project.
+
+
+Don't compile sphinx?
+=====================
+
+If make html fails with the message:
+
+   "Could not import extension ginsfsm.sphinxext"
+
+check if the next modules are installed:
+
+   * docutils
+   * svgwrite
+   * PIL
+     Better install `pillow`, with pip.
+     `pillow` will need libfreetype*dev and libjpeg*dev libs to compile.

ginsfsm/examples/inter_event/banco/docs/api_banco.rst

+banco
+=====
+
+This is the main index page of your documentation. It should be written in
+`reStructuredText format <http://docutils.sourceforge.net/rst.html>`_.
+
+
+:mod:`banco`
+------------
+
+.. automodule:: banco

ginsfsm/examples/inter_event/banco/setup.cfg

+[nosetests]
+match = ^test
+nocapture = 1
+cover-package = banco
+with-coverage = 1
+cover-erase = 1
+
+[egg_info]
+tag_build =
+tag_svn_revision = false
+tag_date = 0
+
+[easy_install]
+zip_ok = false

ginsfsm/examples/inter_event/banco/setup.py

+# -*- encoding: utf-8 -*-
+
+import os
+import sys
+import banco
+
+from setuptools import setup, find_packages
+
+if sys.version_info[:2] < (2, 6):
+    raise RuntimeError('Requires Python 2.6 or better')
+
+here = os.path.abspath(os.path.dirname(__file__))
+try:
+    README = open(os.path.join(here, 'README.rst')).read()
+    CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
+except IOError:
+    README = CHANGES = ''
+
+requires = [''
+    'ginsfsm',
+    'pyramid >= 1.4',
+]
+
+setup(name='banco',
+    version=banco.__version__,
+    description='banco',
+    long_description=README + '\n\n' + CHANGES,
+    classifiers=[
+        "Programming Language :: Python",
+    ],
+    author='',
+    author_email='',
+    url='',
+    license='MIT License',
+    keywords='gobj ginsfsm finite state machine fsm wsgi',
+    packages=find_packages(),
+    include_package_data=True,
+    zip_safe=False,
+    install_requires=requires,
+    tests_require=requires,
+    test_suite="banco.tests",
+    entry_points="""\
+    [paste.app_factory]
+    main = banco.main:main
+    pyramid_app = banco.main:pyramid_paste_factory
+    """,
+)