Changes between Version 21 and Version 22 of EggCookingTutorialTrac0.11


Ignore:
Timestamp:
Sep 15, 2015, 5:16:08 PM (9 years ago)
Author:
Ryan J Ollos
Comment:

Minor clarifications and formatting changes.

Legend:

Unmodified
Added
Removed
Modified
  • EggCookingTutorialTrac0.11

    v21 v22  
    7070== Make it a module ==
    7171
    72 To make the plugin a module, you simply create an ''_''____''_init_''____''_.py'' in ''./helloworld-plugin/helloworld/'':
    73 {{{
    74 #!python
    75 # Helloworld module
     72To make the plugin a module, you simply create an `__init__.py` in `helloworld-plugin/helloworld/`:
     73{{{#!python
    7674from helloworld import *
    7775}}}
     
    8078
    8179Now it's time to make it an egg. For that we need a chicken called ''setup.py'' in ''./helloworld-plugin/'':
    82 {{{
    83 #!python
     80{{{#!python
    8481from setuptools import find_packages, setup
    8582
     
    10198== First deployment ==
    10299
    103 Now try to build the plugin. Run the command {{{python setup.py bdist_egg}}} in the directory where you created it. If everything went OK you should have a .egg file in ''./dist'' directory.
    104 Copy this ''.egg'' file to ''/[your trac env]/plugins'' directory.
     100Now try to build the plugin. Run the command `python setup.py bdist_egg` in the directory where you created `setup.py`. If everything went OK you should have a `.egg` file in the newly-created `dist` directory.
     101
     102Copy the `.egg` file to your `$env/plugins` directory. If you are running a web server, rather than TracStandalone, you will need to restart the web server.
    105103
    106104During development you can run the command {{{python setup.py develop}}} in the directory where you created it.  This way you don't need to do it every time you change the code. Check [trac:TracDev/PluginDevelopment] for more deployment options.
    107105
    108 Edit the conf/trac.ini file by adding {{{helloworld.* = enabled}}} in the {{{[components]}}} section.
    109 
    110 Copy this .egg file to /[your trac env]/plugins directory. Restart the trac server. If you're using mod_python you have to restart Apache.
     106Edit the `$env/conf/trac.ini` file by adding `helloworld.* = enabled` in the `[components]` section.
    111107
    112108Now you should see a ''Hello World'' link on the far right in the main navigation bar when accessing your site. Click it.
     
    342338
    343339== The egg grows ==
    344 
    345 Natural eggs don't dron, Python ones do.
    346340
    347341Modify ''setup.py'' to include our static data: