[Distutils] How can I get setuptools to include files beyond what find_packages() finds?
Phillip J. Eby
pje at telecommunity.com
Tue Jul 31 00:44:41 CEST 2007
At 05:17 PM 7/30/2007 -0500, Robert Kern wrote:
>The main problem is that bdist_rpm is not working on enthought.kiva. Most
>likely, this is the fault of numpy.distutils. However, this is a bug
>that needs
>to be caught and fixed. Working around it by doing an --inplace build and then
>trying to include the extension modules as package_data is not likely to work
>and is not a solution.
Yep; that's why I recommend finding the actual problem -- thanks for
pointing it out more specifically.
>I'm not usually a Redhat guy, so I don't have much experience with bdist_rpm;
>however, numpy.distutils has had problems with bdist_rpm in the past.
The keys to making bdist_rpm work for a distutils extension are:
1. Make sure you install stuff to the right place
2. Implement get_outputs() correctly
The most likely source of the problem is if your get_outputs() isn't
listing the .so files; in that case they'd won't be listed in
INSTALLED_FILES, which is used by bdist_rpm.
The other possibility is that the files aren't getting installed by
install_lib, as install_lib expects to just copy the build tree to
the target. If the built files aren't in the right place, then they
won't get installed even if they're listed in the files.
You can easily test this by running an install command using
--root=/some/dir --record=SOME_FILE. If this doesn't install
something like
"/some/dir/usr/lib/python2.x/site-packages/whatever/something.so", or
the file isn't listed in SOME_FILE, you can track it down further
from there -- it's not a problem specific to bdist_rpm in that
case. You can also see if it's correct with or without setuptools,
to see if the interaction is in fact there.
>I'm trying
>to get an environment working on a Redhat machine, and will try to
>build an RPM
>for enthought.kiva and try to see the problem first-hand. I've looked over
>Stanley's emails on the subject, and don't see enough information for me to
>really pin down the problem.
I'd suggest trying an install --root/--record test first, since if
that doesn't work right, you know RPMs aren't even involved. So
that'll help narrow down where the actual issue lies.
More information about the Distutils-SIG
mailing list