Hi,

Well I just wrote the response below which someone else might find 
useful in the future but in this case I've a hunch the problem is that 
you have chosen the name ``new`` as the test. I expect Python is 
importing the name ``new`` rather than your new project. Try creating a 
test project that doesn't conflict with an existing Python module?

HTH,

James


Oh I see, well as I mentioned I think the error is because paste can't 
find the paste.app_factory main entry point for the generated package so 
you'll have to experiment a bit. Have a really careful look at 
/home/chris/pylons/new/setup.py and check the entry points are there and 
that you haven't specified the wrong package name by mistake in the 
entry_points line. If it all looks right try running

python setup.py egg_info

to regenerate the egg information. Can you post the actual generated 
setup.py which is going wrong rather than the template one as it is 
tricky to debug otherwise. Also make sure that the make_app() function 
still exists in the correct place (ie that you haven't altered 
package/__init__.py by mistake?).


emery wrote:
> 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