X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/d836375732b9b8797c927ef6bdfc1765606f874e..247220d040f64482ee8363708df27f2d1d244c55:/doc/create.rst diff --git a/doc/create.rst b/doc/create.rst index aaa88fc..e87726e 100644 --- a/doc/create.rst +++ b/doc/create.rst @@ -72,42 +72,52 @@ create :file:`$WIZARD/wizard/app/wordpress.py` and fill it in with a bare bones Finally, we have to tell Wizard about this new module. If you are creating this new module for Scripts, the easiest way to tell Wizard -about the application is to add it to the :mod:`wizard_scripts` plugin. -You can do this by editing :file:`plugins/scripts/setup.py` and adding -your application to the ``wizard.app`` entry point as follows:: - - 'wizard.app': ['wordpress = wizard.app.wordpress:Application', - 'mediawiki = wizard.app.mediawiki:Application', +about the application is to add it to the :mod:`wizard_scripts` +`setuptools plugin `_. +EVen if you don't know anything about setuptools, it's pretty easy +to add your application: edit the file :file:`plugins/scripts/setup.py` +and add your application to the ``wizard.app`` entry point by looking +for the following chunk of code and adding a new line:: + + 'wizard.app': ['mediawiki = wizard.app.mediawiki:Application', 'phpBB = wizard.app.phpBB:Application', + 'wordpress = wizard.app.wordpress:Application', # NEW LINE! ], -You can then refresh plugin information by running the :file:`refresh.sh` +This tells Wizard that there is a new application named ``wordpress``, +with a module named ``wizard.app.wordpress`` and a class named +``Application`` in that module, which Wizard should use. + +You need to refresh plugin information by running the :file:`refresh.sh` script or by running :file:`python setup.py egg_info` in the :file:`plugins/scripts` directory. -If you are creating this module separate from scripts, you will need to -create a :file:`setup.py` file from scratch in your own plugin. A -reasonable template file is:: - - import setuptools - - setuptools.setup( - name = 'wizard-myapp', - version = '0.1.dev', - author = 'Me', - author_email = 'my-email@mit.edu', - description = ('My Awesome Application'), - license = 'My Awesome License', - url = 'http://www.example.com/', - packages = setuptools.find_packages(), - entry_points = { - 'wizard.app': ['wordpress = wizard.app.wordpress:Application', - ], - } - ) - -Don't forget to run :file:`python setup.py egg_info` and add your module -to your :envvar:`PYTHON_PATH`. +.. note:: + + If you do not want to place your application in the Scripts plugin, + you will need to create a :file:`setup.py` file from scratch in your + own plugin. A reasonable template file is:: + + import setuptools + + setuptools.setup( + name = 'wizard-myapp', + version = '0.1.dev', + author = 'Me', + author_email = 'my-email@mit.edu', + description = ('My Awesome Application'), + license = 'My Awesome License', + url = 'http://www.example.com/', + packages = setuptools.find_packages(), + entry_points = { + 'wizard.app': ['wordpress = wizard.app.wordpress:Application', + ], + } + ) + + Don't forget to run :file:`python setup.py egg_info` and add your module + to your :envvar:`PYTHON_PATH` (otherwise, Wizard won't know that + your plugin exists!) Now we are ready to put some code in our repository: the first thing we will add is the :term:`pristine` branch, which contains verbatim the code from upstream.