This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author purpleidea
Recipients purpleidea, tarek
Date 2009-06-05.14:03:22
SpamBayes Score 4.62963e-13
Marked as misclassified No
Message-id <1244210606.6.0.749223227815.issue6205@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, I have shown the output from my terminal below, since it will be
easier to follow for explaining the bug.

james@computer:~/testsetup$ ls
helloworld2.py  image1.jpg  setup.py
james@computer:~/testsetup$ cat setup.py 
#!/usr/bin/python
import distutils.core	#from distutils.core import setup, Extension
import os

# build a list of modules required for setup function below
py_modules = []

py_modules.append('helloworld2')

distutils.core.setup(
	name='helloworld2',
	description='distutils test',
	version='0.1',
	author='James',
	author_email='purpleidea@gmail.com',
	py_modules=py_modules,
	# data_files: install directory, 
	data_files=[('share/helloworld2', ['image1.jpg'])]
)

james@computer:~/testsetup$ ./setup.py sdist
running 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,
README.txt
writing manifest file 'MANIFEST'
creating helloworld2-0.1
making hard links in helloworld2-0.1...
hard linking helloworld2.py -> helloworld2-0.1
hard linking setup.py -> helloworld2-0.1
creating dist
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@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
automatic anymore.
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.

_J
History
Date User Action Args
2009-06-05 14:03:27purpleideasetrecipients: + purpleidea, tarek
2009-06-05 14:03:26purpleideasetmessageid: <1244210606.6.0.749223227815.issue6205@psf.upfronthosting.co.za>
2009-06-05 14:03:24purpleidealinkissue6205 messages
2009-06-05 14:03:22purpleideacreate