Having issue creating Paste template for distribution

0 views
Skip to first unread message

Jonathan Vanasco

unread,
Nov 10, 2009, 2:49:10 PM11/10/09
to Paste Users
I'm trying to ready a package for distribution using Paste

I've figured out many of the things i wanted to do, but am stuck on
one thing --

the templates system that i've created doesn't create the directory
+project+.egg-info , which keeps the entire distro from working

can anyone point me as to how/where that gets created ? i haven't
found it yet.

Ian Bicking

unread,
Nov 10, 2009, 3:52:38 PM11/10/09
to Jonathan Vanasco, Paste Users

Do you need that? Usually "python setup.py egg_info" (or install or
develop, which call egg_info) creates that .egg-info directory.

Directories that are empty might not get installed properly. If you
put a file like .empty-dir, then it should get installed. paster
create skips files with leading dots (though you can use
+dot+empty-dir for example -- but you don't want to for this).


--
Ian Bicking | http://blog.ianbicking.org | http://topplabs.org/civichacker

Jonathan Vanasco

unread,
Nov 10, 2009, 5:24:52 PM11/10/09
to Paste Users
On Nov 10, 3:52 pm, Ian Bicking <ianbick...@gmail.com> wrote:
> On Tue, Nov 10, 2009 at 2:49 PM, Jonathan Vanasco <jonat...@findmeon.com> wrote:
> Do you need that?  Usually "python setup.py egg_info" (or install or
> develop, which call egg_info) creates that .egg-info directory.
>
> Directories that are empty might not get installed properly.  If you
> put a file like .empty-dir, then it should get installed.  paster
> create skips files with leading dots (though you can use
> +dot+empty-dir for example -- but you don't want to for this).

I'm using Paster to create templates for Pylons applications.

`paster serve` won't run without the .egg-info directory in there. If
i manually create one , it's fine. Otherwise, it won't find it.

if i create a new application using the default templates, or some of
the different templates that are available online, the .egg-info
directory is created. I can't figure out why mine isn't being created
in this instance, which is just baffling me.

Ian Bicking

unread,
Nov 10, 2009, 7:32:11 PM11/10/09
to Jonathan Vanasco, Paste Users
paster create will call "python setup.py egg_info" itself, I think, but since setup.py doesn't already exist it isn't a hard error if it can't do that.

Jonathan Vanasco

unread,
Nov 10, 2009, 8:59:35 PM11/10/09
to Paste Users
On Nov 10, 7:32 pm, Ian Bicking <ianbick...@gmail.com> wrote:
> paster create will call "python setup.py egg_info" itself, I think, but
> since setup.py doesn't already exist it isn't a hard error if it can't do
> that.

Ah ha! thanks! that helped me find the issue.

Paster looks for the setup.py in the top-level of the template; except
my template had that nested a level down -- in this situation is
creates an entire web server, and pylons is only one of the
components.

this hack of a code made things work in a 'post' routine

app_setup_dir= os.path.join( output_dir , 'web-pylons' , vars
['project'] )
app_setup_file= os.path.join( app_setup_dir , 'setup.py' )
if not os.path.exists(app_setup_file):
raise ValueError( 'No setup.py for app' )
cwd= os.getcwd()
os.chdir( app_setup_dir )
os.system( 'python setup.py egg_info' )
os.chdir( cwd )
Reply all
Reply to author
Forward
0 new messages