[5341] | 1 | Installation |
---|
| 2 | ************ |
---|
| 3 | |
---|
[5768] | 4 | .. note:: `waeup.sirp` might not work with Python > 2.5 |
---|
[5341] | 5 | currently. Use of Python 2.5 is recommended. |
---|
| 6 | |
---|
[5768] | 7 | .. note:: `waeup.sirp` does not work on Windows. |
---|
[5341] | 8 | |
---|
| 9 | Prerequisites |
---|
| 10 | ============= |
---|
| 11 | |
---|
[5768] | 12 | The `waeup.sirp` package is based on `Grok`_, which is a Python |
---|
[5341] | 13 | framework for agile webapplication development. Grok itself is based |
---|
| 14 | on `Zope`_. |
---|
| 15 | |
---|
| 16 | .. _Grok: http://grok.zope.org/ |
---|
| 17 | |
---|
| 18 | .. _Zope: http://www.zope.org/ |
---|
| 19 | |
---|
| 20 | Both, Grok and Zope, are written in Python (with parts written in |
---|
| 21 | C). You therefore need `Python`_ installed. |
---|
| 22 | |
---|
| 23 | .. _Python: http://www.python.org/ |
---|
| 24 | |
---|
| 25 | Note, that you also need the Python header files and a compiler to |
---|
| 26 | compile the parts written in C. |
---|
| 27 | |
---|
[5768] | 28 | To deploy `waeup.sirp` most easily, we use `zc.buildout`_ |
---|
[5341] | 29 | |
---|
| 30 | .. _zc.buildout: http://cheeseshop.python.org/pypi/zc.buildout |
---|
| 31 | |
---|
| 32 | You may have setuptools already installed for your system Python. In |
---|
| 33 | that case, you may need to upgrade it first because buildout requires |
---|
| 34 | a very recent version:: |
---|
| 35 | |
---|
| 36 | $ sudo easy_install -U setuptools |
---|
| 37 | |
---|
| 38 | If this command fails because easy_install is not available, there is |
---|
| 39 | a good chance you do not have setuptools available for your system |
---|
| 40 | Python. If so, there is no problem because setuptools will be |
---|
| 41 | installed locally by buildout. |
---|
| 42 | |
---|
| 43 | Bootstrap the buildout environment:: |
---|
| 44 | |
---|
| 45 | $ python2.5 bootstrap/bootstrap.py |
---|
| 46 | |
---|
| 47 | and run the buildout command:: |
---|
| 48 | |
---|
| 49 | $ bin/buildout |
---|
| 50 | [lots of stuff will be downloaded and installed here] |
---|
| 51 | |
---|
| 52 | Note that if you have more than one sandbox for a Zope-based web |
---|
| 53 | application, it will probably make sense to share the eggs between the |
---|
| 54 | different sandboxes. You can tell ``zc.buildout`` to use a central |
---|
| 55 | eggs directory by creating ``~/.buildout/default.cfg`` with the |
---|
| 56 | following contents:: |
---|
| 57 | |
---|
| 58 | [buildout] |
---|
| 59 | eggs-directory = /home/bruno/buildout-eggs |
---|
| 60 | |
---|
[5768] | 61 | Running the `waeup.sirp` application |
---|
[5341] | 62 | ====================================== |
---|
| 63 | |
---|
| 64 | You can start Zope with the with the following command:: |
---|
| 65 | |
---|
[5767] | 66 | $ bin/sirpctl fg |
---|
| 67 | |
---|
| 68 | Alternatively you can do: |
---|
[5341] | 69 | |
---|
[5767] | 70 | $ bin/paster serve parts/etc/deploy.ini |
---|
| 71 | |
---|
[5341] | 72 | If you now connect to port 8080 and log in with username 'grok', |
---|
| 73 | password 'grok', you should be able to add the grok-based applications |
---|
| 74 | (such as ``University``) from the menu. |
---|
| 75 | |
---|
| 76 | Add an instance of ``University`` and click on the link next to the |
---|
| 77 | then visible entry in the list of installed applications. |
---|
| 78 | |
---|
| 79 | Running the tests |
---|
| 80 | ================= |
---|
| 81 | |
---|
| 82 | The tests are easily run by executing the test runner that's |
---|
| 83 | installed in the ``bin`` directory:: |
---|
| 84 | |
---|
| 85 | $ bin/test |
---|
| 86 | |
---|