Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > distutils question-> Why data_files listed in setup.py being ignored?! How fix?

Reply
Thread Tools

distutils question-> Why data_files listed in setup.py being ignored?! How fix?

 
 
Christian Seberino
Guest
Posts: n/a
 
      10-07-2003
I have a setup.py with something like this:


import glob

....

setup( ...,
...,
data_files = [ ( "pixmaps", glob.glob("pixmaps/*.xpm") ) ]
....
)

The tarball I made with "python setup.py sdist" looks good except
none of the data_files show up in tarball?!?!

How fix?

Chris
 
Reply With Quote
 
 
 
 
David M. Cooke
Guest
Posts: n/a
 
      10-07-2003
At some point, http://www.velocityreviews.com/forums/(E-Mail Removed) (Christian Seberino) wrote:

> I have a setup.py with something like this:
>
> import glob
>
> ...
>
> setup( ...,
> ...,
> data_files = [ ( "pixmaps", glob.glob("pixmaps/*.xpm") ) ]
> ....
> )
>
> The tarball I made with "python setup.py sdist" looks good except
> none of the data_files show up in tarball?!?!
>
> How fix?


You have to add them to your MANIFEST.in . Something like:
include pixmaps/*.xpm

setup(scripts=...) has the same problem.

--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
 
Reply With Quote
 
 
 
 
Christian Seberino
Guest
Posts: n/a
 
      10-08-2003
David

Thank you *very* much. I needed that.

Chris

(E-Mail Removed) (David M. Cooke) wrote in message news:<(E-Mail Removed)> ...
> At some point, (E-Mail Removed) (Christian Seberino) wrote:
>
> > I have a setup.py with something like this:
> >
> > import glob
> >
> > ...
> >
> > setup( ...,
> > ...,
> > data_files = [ ( "pixmaps", glob.glob("pixmaps/*.xpm") ) ]
> > ....
> > )
> >
> > The tarball I made with "python setup.py sdist" looks good except
> > none of the data_files show up in tarball?!?!
> >
> > How fix?

>
> You have to add them to your MANIFEST.in . Something like:
> include pixmaps/*.xpm
>
> setup(scripts=...) has the same problem.

 
Reply With Quote
 
Christian Seberino
Guest
Posts: n/a
 
      10-08-2003
David

I'm sorry but I'm still having problems.
I added an include line in MANIFEST.in
but still cannot get *any* data files included!!

I made a toy example to show my problem...

=============================================
Here are my package files:
=============================================
setup.py
MANIFEST.in
foo.py
somedata
=============================================
Here is contents of setup.py:
=============================================
from distutils.core import setup

setup(name = "foo",
version = "1.0",
data_files = [ ("data", ["somedata"]) ],
packages = [""])
=============================================
Here is MANIFEST.in:
=============================================
include "somedata"
=============================================
Here is what happens when I try to do "python setup.py sdist":
=============================================
% python setup.py sdist
running sdist
....etc.
reading manifest template 'MANIFEST.in'
warning: no files found matching '"somedata"'
....etc.
=============================================

I tried *absolute* paths in MANIFEST.in and data_files.
I tried to move data files to different places. I tried using wild
cards.

NOTHING seems to make distutils SEE my data files?!?!?

Chris
 
Reply With Quote
 
Terje Rosten
Guest
Posts: n/a
 
      10-08-2003
* Christian Seberino
|
| Here is MANIFEST.in:
| =============================================
| include "somedata"

Try:

include somedata


- Terje
 
Reply With Quote
 
Christian Seberino
Guest
Posts: n/a
 
      10-09-2003
Terje

Thanks. All is well now. Does it seem strange to you that you must
specify data files in setup.py with data_files field and then
AGAIN in the MANIFEST.in file with include???

How make MANIFEST.in NOT be necessary for data files?

Chris

Terje Rosten <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> * Christian Seberino
> |
> | Here is MANIFEST.in:
> | =============================================
> | include "somedata"
>
> Try:
>
> include somedata
>
>
> - Terje

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
distutils: tweaking my ini to use relevant data_files path Anastasios Hatzis Python 0 03-07-2007 10:04 AM
distutils: trouble with data_files + RPM Torsten Bronger Python 0 12-10-2006 11:02 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
A solution to distutils' habit of installing data_files inconsistantly Lonnie Princehouse Python 0 04-14-2004 09:27 PM



Advertisments