Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install web2pyrecipe

How to install web2pyrecipe

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install web2pyrecipe
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0.1 Available View build log
1.0 Failed View build log
Windows (64-bit)
1.0.1 Available View build log
1.0 Failed View build log
Mac OS X (10.5+)
1.0.1 Available View build log
1.0 Failed View build log
Linux (32-bit)
1.0.1 Available View build log
1.0 Failed View build log
Linux (64-bit)
1.0.1 Available View build log
1.0 Failed View build log
 
License
ZPL
Dependencies
Lastest release
version 1.0.1 on Nov 10th, 2011
A buildout to develop the web2pyrecipe.

It should download the lastest version of web2py, install an user defined app
and create a script to run it.

- Code repository: http://github.com/douglascamata/web2pyrecipe...
- Questions and comments to d.camata@gmail.com
- Report bugs at http://github.com/douglascamata/web2pyrecipe/issues..


Detailed Documentation
**********************

Supported options
=================

appdir
    The directory where the compressed web2py application should be ...

default
    The default app of the web2py server ...

password
    The password for web2py adminsitrative app ...

Testing now::

    >>> write('buildout.cfg',
    ... """
    ... [buildout]
    ... parts = test1
    ...
    ... [test1]
    ... recipe = web2pyrecipe
    ... password = 123
    ... pidfile = pid.txt
    ... appdir = %(dir)s
    ... default = web2py.app.chat
    ... option2 = %(bar)s
    ... """ % { 'dir' : 'web2pyapps', 'bar' : 'value2'})

    >>> mkdir('web2pyapps')
    ...

Downloading example app::

    >>> system('wget http://www.web2py.com/appliances/default/download/app.source.aa6d3615911c89b6.7765623270792e6170702e636861742e773270.w2p -O web2pyapps/web2py.app.chat.w2p -q')
    ''

Running the buildout gives us::

    >>> print 'start', system(buildout)
    start...
    Installing test1.
    Unused options for test1: 'option2'.
    

Checking the root directory structure::

    >>> ls('.')
     -  .installed.cfg
     d  bin
     -  buildout.cfg
     d  develop-eggs
     d  eggs
     d  parts
     d  web2py
     d  web2pyapps

Checking the test app for w2p::

    >>> ls('web2pyapps')
     - web2py.app.chat.w2p

Checking if web2py is extracted correctly::

    >>> ls('web2py')
    -  ABOUT
    -  LICENSE
    -  Makefile
    -  NEWINSTALL
    -  README
    -  VERSION
    -  __init__.py
    -  anyserver.py
    -  app.example.yaml
    -  appengine_config.py
    d  applications
    -  cgihandler.py
    -  epydoc.conf
    -  epydoc.css
    -  fcgihandler.py
    -  gaehandler.py
    d  gluon
    -  isapiwsgihandler.py
    -  logging.example.conf
    -  modpythonhandler.py
    -  options_std.py
    -  queue.example.yaml
    -  router.example.py
    -  routes.example.py
    -  routes.py
    -  scgihandler.py
    d  scripts
    -  setup.py
    -  setup_app.py
    -  setup_exe.py
    -  setup_exe_2.6.py
    d  site-packages
    -  splashlogo.gif
    -  web2py.py
    -  wsgihandler.py

Checking if the test app is correctly extracted at web2py's application directory::

    >>> ls(join('web2py','applications'))
    -  __init__.py
    d  admin
    d  examples
    d  web2py_app_chat
    d  welcome

    >>> cat(join('web2py','routes.py'))
    default_application = 'web2py_app_chat'
    default_controller = 'default'
    default_function = 'index'

Checking if the script for running the web2py server is created on 'bin' directory::

    >>> ls('bin')
    - buildout
    - web2py

So, let's check the content of 'web2py' script::

    >>> cat(join('bin','web2py'))
    #!/bin/bash
    PYTHON=python
    
    start() {
        ${PYTHON} web2py/web2py.py -a 123 -d pid.txt &
    }
    
    stop() {
        kill `cat web2py/pid.txt`
    }
    
    case "$1" in
      start)
        start;;
      stop)
        stop;;
      restart)
        start
        stop;;
      *)
      echo "Usage: web2py {start|stop|restart}"
      exit 1;;
    esac
    exit


Contributors
************

"Douglas Camata", Author


Change history
**************

1.0.1 (2011-11-10)
----------------

- Lots of refactoring to a more pythonic and less
  system-depedent code


1.0.0 (2010-09-30)
----------------

- Initial release

Download
********

Subscribe to package updates

Last updated Nov 10th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.