[Distutils] Including data files with setuptools
Adeel Ahmad Khan
kadeel at gmail.com
Sat Jul 25 23:28:20 CEST 2009
I am having some trouble including data files in the egg installed by
setuptools. I've listed the data files in MANIFEST.in and set
include_package_data = True.
% ls
LICENSE README ez_setup.py timed.py
MANIFEST.in cmdapp.py setup.py
% cat setup.py
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
# ...
py_modules=['timed', 'cmdapp'],
entry_points={'console_scripts': ['timed = timed:main']},
include_package_data=True,
install_requires=['PyYAML'],
zip_safe=False,
)
% cat MANIFEST.in
include *.py
include README
include LICENSE
% sudo python setup.py install
running install
running bdist_egg
running egg_info
creating timed.egg-info
writing requirements to timed.egg-info/requires.txt
writing timed.egg-info/PKG-INFO
writing top-level names to timed.egg-info/top_level.txt
writing dependency_links to timed.egg-info/dependency_links.txt
writing entry points to timed.egg-info/entry_points.txt
writing manifest file 'timed.egg-info/SOURCES.txt'
reading manifest file 'timed.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'timed.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.3-i386/egg
running install_lib
running build_py
creating build
creating build/lib
copying timed.py -> build/lib
copying cmdapp.py -> build/lib
creating build/bdist.macosx-10.3-i386
creating build/bdist.macosx-10.3-i386/egg
copying build/lib/cmdapp.py -> build/bdist.macosx-10.3-i386/egg
copying build/lib/timed.py -> build/bdist.macosx-10.3-i386/egg
byte-compiling build/bdist.macosx-10.3-i386/egg/cmdapp.py to cmdapp.pyc
byte-compiling build/bdist.macosx-10.3-i386/egg/timed.py to timed.pyc
creating build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/PKG-INFO -> build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/SOURCES.txt ->
build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/dependency_links.txt ->
build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/entry_points.txt ->
build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/not-zip-safe ->
build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/requires.txt ->
build/bdist.macosx-10.3-i386/egg/EGG-INFO
copying timed.egg-info/top_level.txt ->
build/bdist.macosx-10.3-i386/egg/EGG-INFO
creating dist
creating 'dist/timed-0.11-py2.6.egg' and adding
'build/bdist.macosx-10.3-i386/egg' to it
removing 'build/bdist.macosx-10.3-i386/egg' (and everything under it)
Processing timed-0.11-py2.6.egg
removing '/usr/local/lib/python2.6/site-packages/timed-0.11-py2.6.egg'
(and everything under it)
creating /usr/local/lib/python2.6/site-packages/timed-0.11-py2.6.egg
Extracting timed-0.11-py2.6.egg to /usr/local/lib/python2.6/site-packages
timed 0.11 is already the active version in easy-install.pth
Installing timed script to /usr/local/bin
Installed /usr/local/lib/python2.6/site-packages/timed-0.11-py2.6.egg
Processing dependencies for timed==0.11
Searching for PyYAML==3.08
Best match: PyYAML 3.08
Processing PyYAML-3.08-py2.6-macosx-10.3-i386.egg
PyYAML 3.08 is already the active version in easy-install.pth
Using /usr/local/lib/python2.6/site-packages/PyYAML-3.08-py2.6-macosx-10.3-i386.egg
Finished processing dependencies for timed==0.11
% ls /usr/local/lib/python2.6/site-packages/timed-0.11-py2.6.egg
EGG-INFO cmdapp.py cmdapp.pyc timed.py timed.pyc
Why isn't README there? What do I need to do to include it?
More information about the Distutils-SIG
mailing list