473,378 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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
Jul 18 '05 #1
5 7513
At some point, se******@spawar.navy.mil (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
Jul 18 '05 #2
David

Thank you *very* much. I needed that.

Chris

co**********@physics.mcmaster.ca (David M. Cooke) wrote in message news:<qn*************@arbutus.physics.mcmaster.ca> ...
At some point, se******@spawar.navy.mil (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.

Jul 18 '05 #3
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
Jul 18 '05 #4
* Christian Seberino
|
| Here is MANIFEST.in:
| =============================================
| include "somedata"

Try:

include somedata
- Terje
Jul 18 '05 #5
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 <te******@phys.ntnu.no> wrote in message news:<yo*************@bohm.phys.ntnu.no>...
* Christian Seberino
|
| Here is MANIFEST.in:
| =============================================
| include "somedata"

Try:

include somedata
- Terje

Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave Harrison | last post by:
afternoon pythonic gurus, quick question about distutils. Im compiling on solaris 9 and am having problems with the linking (I loathe solaris these days ;-), and if I call gcc by hand and...
0
by: A.M. Kuchling | last post by:
I want to make a Distutils 1.1 release that wraps up the version of the code that was in Python 2.3. This would be the last 1.5.2-compatible release of Distutils, giving people the chance to use...
3
by: Rick Muller | last post by:
I've been trying to figure out whether there are any plans to add an "uninstall" feature to the Python distutils. Googling has found several people posting the same question, but, to the best of my...
1
by: Jens Thiede | last post by:
Pardon the silly question, but can one use distutils to install somewhere other than site-packages, or is distutils only ment for this kind of a job. I'd like to use it to make the distribution of...
15
by: Colin J. Williams | last post by:
The distutils download page has: -------------------------------------------------------- Current stable release The current stable release is Distutils 1.0.2; you can download it as: *...
3
by: Qiangning Hong | last post by:
I am writing a setup.py for my package. I have a pre-compiled myextmod.pyd file in my package and I want the distutils to automatically copy it to...
2
by: Laszlo Zsolt Nagy | last post by:
How how can I install my .mo files from a distutil script into its default location? sys.prefix + os.sep + 'share' + os.sep + 'locale'
2
by: RickMuller | last post by:
I really appreciate the ease that the distutils make distributing Python modules. However, I have a question about using them to distribute non-Python (i.e. text) data files that support Python...
7
by: vedrandekovic | last post by:
Hello again, Is there any patch for python "distutils", for this ImportError: cannot import name log Regards, Vedran
3
by: Rick Muller | last post by:
I need some distutils help. I currently run a python library (PyQuante) that, until recently, had all of its modules in a single directory, called "PyQuante". The setup command in my setup.py...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.