durusmail: quixote-users: Re: setup.py and ptl files
setup.py and ptl files
Re: setup.py and ptl files
2003-07-02
2003-07-02
2003-07-02
Re: setup.py and ptl files
Graham Fawcett
2003-07-02
Mark Bucciarelli wrote:
> How do I have setup.py include ptl files during the install?
>
> [OT Is there a searchable list archive?]

     http://news.gmane.org/thread.php?group=gmane.comp.web.quixote.user

I seem to recall there's a recency limit of some kind on the search (last N
messages).

>
> I put
>
>         data_files = [('', ['realtime/forms.ptl', 'realtime/qcal.ptl',
>                 'realtime/ui.ptl', 'realtime/pages.ptl'])]
>
> in setup.py, but this sticks the ptl files in /usr.  According the the
> disutils docs, an empty string for the directory puts them in the
> target directory, which I expected would by
> ..../site-packages/realtime/.
>

I'm not sure whether this will solve your target-directory problem, but iff you
are building and subsequently installing a source distribution (sdist), you
could add a MANIFEST.in file to your source root.

        # MANIFEST.in
        recursive-include realtime *.ptl

Much easier than specifying all of those ptl files one by one. And
semantically, I think the manifest approach is closer to your intent, since it
is used to specify source files.

See sections 5.1 and 5.2 of the Distutils reference manual for (slightly) more
info on the manifest technique.


-- Graham



reply