Thanks James, but I think I am still missing something. The setup.py I
posted is for the custompylons package that contains the template
directory. The application that is generated using pylons create
template=cpcc_pylons then has a setup.py (generated from
setup.py_tmpl) that does contain those entry points. Since make_app is
actually defined in the generated pylons project, I am not sure how to
reference it in the custompylons package setup.py.

I've added the setup.py_tmpl I am using in the custom project to
http://paste.lisp.org/display/43399#3. Forgive me if I am being
obtuse, entry points and packaging are still very new to me.


On Jun 25, 3:12 pm, James Gardner <[EMAIL PROTECTED]> wrote:
> Your setup.py file doesn't have the paste.app_factory main entry point
> so the paster command doesn't know where the make_app() function of your
> Pylons app actually is. To fix this make your entry_points look like this:
>
> entry_points="""
>      [paste.app_factory]
>      main=cpccpylons:make_app
>      [paste.app_install]
>      main=paste.script.appinstall:Installer
>      [paste.paster_create_template]
>      cpcc_pylons=cpccpylons.cpcc:CPCCTemplate
> """,
>
> You might need to change the line starting main= so that it points to
> the correct module where you make_app() function is defined.
>
> HTH,
>
> James
>
> emery wrote:
> > Thanks for the reply. I've posted the setup.py here:
> >http://paste.lisp.org/display/43399#1
>
> > Chris
>
> > On Jun 25, 2:46 pm, James Gardner <[EMAIL PROTECTED]> wrote:
> >> Could you please post your setup.py file? You have probably made a
> >> mistake in the entry_points section.
>
> >> Cheers,
>
> >> James
>
> >> emery wrote:
> >>> Hello all,
> >>> I am trying to customize the paster template for pylons applications
> >>> to eliminate the need for repetitive changes when creating new pylons
> >>> projects (e.g. replacing templates, some port# changes, etc).
> >>> I have followed the tutorial here:
> >>>http://docs.pythonweb.org/display/pylonscookbook/Creating+Templates+F...
> >>> (I used the default_project template directory from pylons without
> >>> customizations to begin with, and will start customizing this once I
> >>> get the template working).
> >>> I was able to create and install my custom template (displays
> >>> correctly using paster create --list-templates). It also generates the
> >>> directory structure (paster create --template=mycustompylons
> >>> projectname) cleanly as far as I can tell. However, when I try to
> >>> serve the new 'custom' pylons application (paster serve --reload
> >>> development.ini) I get: LookupError: Entry point 'main' not found in
> >>> egg 'projectname'.
> >>> I have posted the errors and applicable files 
> >>> here:http://paste.lisp.org/display/43399#2
> >>> . Any help would be appreciated.
> >>> C. Emery.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to