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

Discussion in 'Python' started by Christian Seberino, Oct 7, 2003.

  1. 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
     
    Christian Seberino, Oct 7, 2003
    #1
    1. Advertising

  2. Re: distutils question-> Why data_files listed in setup.py beingignored?! How fix?

    At some point, (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
     
    David M. Cooke, Oct 8, 2003
    #2
    1. Advertising

  3. David

    Thank you *very* much. I needed that.

    Chris

    (David M. Cooke) wrote in message news:<>...
    > At some point, (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.
     
    Christian Seberino, Oct 8, 2003
    #3
  4. 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
     
    Christian Seberino, Oct 8, 2003
    #4
  5. Christian Seberino

    Terje Rosten Guest

    Re: distutils question-> Why data_files listed in setup.py beingignored?! How fix?

    * Christian Seberino
    |
    | Here is MANIFEST.in:
    | =============================================
    | include "somedata"

    Try:

    include somedata


    - Terje
     
    Terje Rosten, Oct 8, 2003
    #5
  6. 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 <> wrote in message news:<>...
    > * Christian Seberino
    > |
    > | Here is MANIFEST.in:
    > | =============================================
    > | include "somedata"
    >
    > Try:
    >
    > include somedata
    >
    >
    > - Terje
     
    Christian Seberino, Oct 9, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xah Lee
    Replies:
    22
    Views:
    1,143
    Tim Roberts
    Mar 21, 2006
  2. Lonnie Princehouse
    Replies:
    0
    Views:
    292
    Lonnie Princehouse
    Apr 14, 2004
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,997
    Smokey Grindel
    Dec 2, 2006
  4. Torsten Bronger

    distutils: trouble with data_files + RPM

    Torsten Bronger, Dec 10, 2006, in forum: Python
    Replies:
    0
    Views:
    345
    Torsten Bronger
    Dec 10, 2006
  5. Anastasios Hatzis
    Replies:
    0
    Views:
    484
    Anastasios Hatzis
    Mar 7, 2007
Loading...

Share This Page