[issue6205] sdist doesn't include data_files
report at bugs.python.org
Fri Jun 5 16:03:27 CEST 2009
New submission from James <purpleidea at gmail.com>:
Hi, I have shown the output from my terminal below, since it will be
easier to follow for explaining the bug.
james at computer:~/testsetup$ ls
helloworld2.py image1.jpg setup.py
james at computer:~/testsetup$ cat setup.py
import distutils.core #from distutils.core import setup, Extension
# build a list of modules required for setup function below
py_modules = 
author_email='purpleidea at gmail.com',
# data_files: install directory,
james at computer:~/testsetup$ ./setup.py sdist
warning: sdist: manifest template 'MANIFEST.in' does not exist (using
default file list)
warning: sdist: standard file not found: should have one of README,
writing manifest file 'MANIFEST'
making hard links in helloworld2-0.1...
hard linking helloworld2.py -> helloworld2-0.1
hard linking setup.py -> helloworld2-0.1
tar -cf dist/helloworld2-0.1.tar helloworld2-0.1
gzip -f9 dist/helloworld2-0.1.tar
removing 'helloworld2-0.1' (and everything under it)
james at computer:~/testsetup$
as you will notice, the image1.jpg file does not get included in the
source distribution, and if i want to backup the entire dir/code of
everything to send to someone else.
perhaps this is a peculiarity of distutils. i realize i could write my
own manifest.in but then i have to specify *everything* and this isn't
this is definitely an issue since a user who downloads the sdist file
and runs an install will see:
error: can't copy 'image1.jpg': doesn't exist or not a regular file
this occurs because it obviously didn't get included in the sdist. the
same thing happens when sdist is run with --no-prune
i thought that perhaps i was using the wrong target so i tried a bdist
(tar.gz). in this case the image1.jpg file gets included, however
unpacking the directory doesn't give me a structure similar to the one
my code is originally maintained in.
so how do i use distutils to share *everything*, (eg: everything
specified in the setup.py directory) with my friends on the tubes?
if you want, i'll write a patch.
nosy: purpleidea, tarek
title: sdist doesn't include data_files
versions: Python 2.5
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list