distutils 1.0.1 - bdist_rpm- MANIFEST.in recursive-include broken?
![](https://secure.gravatar.com/avatar/6ed0b444e46d40c06483e4c528b19c9f.jpg?s=120&d=mm&r=g)
Using distutils 1.0.1 with Python 1.5.2 on Redhat 6.2: I'm trying to build an RPM for my package using distutils. I tried to create 'MANIFEST.in', containing: recursive-include *.py recursive-include *.h recursive-include *.hh recursive-include *.cc recursive-include *.c graft examples prune test global-exclude *~ However, the resulting MANIFEST is missing the include files (*.h), so the necessary files aren't copied to the temporary build directories, and the RPM related compilations fail. I finally built an explicit MANIFEST file that contained all my source code files, and then setup.py bdist_rpm worked. (Of course having to manually build 'MANIFEST' is extra work.) Is there another snapshot in the works, or should I try the CVS version? -- Joe VanAndel National Center for Atmospheric Research http://www.atd.ucar.edu/~vanandel/ Internet: vanandel@ucar.edu
![](https://secure.gravatar.com/avatar/6ed0b444e46d40c06483e4c528b19c9f.jpg?s=120&d=mm&r=g)
Bastian Kleineidam wrote:
You can try "recursive-include . *.py". I think the second param must be a directory name.
I just tried your suggestion, and the include files (*.h) still aren't added to the MANIFEST, so the compilations fail. -- Joe VanAndel National Center for Atmospheric Research http://www.atd.ucar.edu/~vanandel/ Internet: vanandel@ucar.edu
![](https://secure.gravatar.com/avatar/ba60bd7f6a9951983ae90cfa4f1283eb.jpg?s=120&d=mm&r=g)
Joe Van Andel wrote:
Bastian Kleineidam wrote:
You can try "recursive-include . *.py". I think the second param must be a directory name.
I just tried your suggestion, and the include files (*.h) still aren't added to the MANIFEST, so the compilations fail.
Using a dot as directory might not yield the results you think. filelist.py works string-based, and files in the current directory are stored in its internal list as "xxxx.h". So it can't find a prefix '.' anywhere. Instead "recursive-include . *.h" you should use "global-include *.h". kind regards Rene Liebscher BTW: It might be a good idea to debug MANIFEST.in files line by line. (You can create the MANIFEST file with "python setup.py sdist -o".) (Greg: Either we document that MANIFEST.in doesn't accept any relative paths (containing '.' or '..') or we send all files/dirs from the template and all files that form filelist's base list through normpath() or even better for Windows normcase().)
![](https://secure.gravatar.com/avatar/12362ecee4672f1dd2d641ce5b4eca14.jpg?s=120&d=mm&r=g)
Rene Liebscher wrote:
(Greg: Either we document that MANIFEST.in doesn't accept any relative paths (containing '.' or '..') or we send all files/dirs from the template and all files that form filelist's base list through normpath() or even better for Windows normcase().)
I think accepting relative paths is a good idea to ease the work of developers. Instead of normpath(), I'd use abspath() though since this turns relative paths into absolute ones. After having done that you may also want to strip the current dir from the absolute names to get ones relative to the current work dir. -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
participants (4)
-
Bastian Kleineidam
-
Joe Van Andel
-
M.-A. Lemburg
-
Rene Liebscher