Is there a deep reason that the sdist command does not include data_file files by default?
Paul Prescod
Paul Prescod wrote:
Is there a deep reason that the sdist command does not include data_file files by default?
AFAIK, the files which are included by sdist are defined by the MANIFEST -- seems reasonable to me.
M.-A. Lemburg wrote:
Paul Prescod wrote:
Is there a deep reason that the sdist command does not include data_file files by default?
AFAIK, the files which are included by sdist are defined by the MANIFEST -- seems reasonable to me.
I think that the MANIFEST is a bad idea. Why have a second way of describing what files are relevant? Setup.py should be enough. Because I think that MANIFEST is a bad idea, I delete it every time I build and let Pyrex generate another. This brings me to my low-level question.
Pyrex generates a MANIFEST according to rules described here:
* http://www.python.org/doc/current/dist/source-dist.html
These rules do not include data_files. My original question was "why not?"
Paul Prescod
Paul Prescod wrote:
M.-A. Lemburg wrote:
Paul Prescod wrote:
Is there a deep reason that the sdist command does not include data_file files by default?
AFAIK, the files which are included by sdist are defined by the MANIFEST -- seems reasonable to me.
I think that the MANIFEST is a bad idea. Why have a second way of describing what files are relevant? Setup.py should be enough.
Maybe because setup.py does not reference all the files that are needed by a project ?! E.g. think of a C library with dozens of header files and auxiliary files that only the C lib's Makefile knows about. distutils wouldn't have a chance to find these automagically. Another example is files that are not part of the installed software, but only included for reference, e.g. README files, hints, install guides, etc.
Because I think that MANIFEST is a bad idea, I delete it every time I build and let Pyrex generate another. This brings me to my low-level question.
Pyrex generates a MANIFEST according to rules described here:
These rules do not include data_files. My original question was "why not?"
Why not write a MANIFEST.in that includes everything you need ?
M.-A. Lemburg wrote:
...
Maybe because setup.py does not reference all the files that are needed by a project ?! E.g. think of a C library with dozens of header files and auxiliary files that only the C lib's Makefile knows about. distutils wouldn't have a chance to find these automagically. Another example is files that are not part of the installed software, but only included for reference, e.g. README files, hints, install guides, etc.
Distutils does not know about these files only because I do not have a way to tell it about them. Imagine:
setup(..., extra_source_files=["README". "install.txt", glob.glob("include/*.h"]...)
Because I think that MANIFEST is a bad idea, I delete it every time I build and let Pyrex generate another. This brings me to my low-level question.
Pyrex generates a MANIFEST according to rules described here:
These rules do not include data_files. My original question was "why not?"
Why not write a MANIFEST.in that includes everything you need ?
That's how I'll solve my problem in the short term but I'm asking a design question. distutils generates MANIFEST files. The algorithm for generating them is well-documented. Those MANIFEST files leave out data_files? Why?
Paul Prescod
Distutils does not know about these files only because I do not have a way to tell it about them. Imagine:
setup(..., extra_source_files=["README". "install.txt", glob.glob("include/*.h"]...)
I admit that I too went looking for this option. My solution was to create a manifest.in, with entries similar to:
include some_dir/*.h,
and will need to duplicate my data_files entries before my sdist will be complete.
So I agree with your sentiments, and think it makes for 2 reasonable feature requests; data_files optionally included, and ability to define extra_source_files, a-la manifent.in lines, in setup.py.
Would such a patch be approved? One day I will need to fix my sdist package, so I'd be happy to 'fix' it inside distutils itself.
Mark.
On Sun, 2004-02-22 at 11:53, Paul Prescod wrote:
Is there a deep reason that the sdist command does not include data_file files by default?
AFAIK, the files which are included by sdist are defined by the MANIFEST -- seems reasonable to me.
I think that the MANIFEST is a bad idea. Why have a second way of describing what files are relevant? Setup.py should be enough. Because I think that MANIFEST is a bad idea, I delete it every time I build and let Pyrex generate another. This brings me to my low-level question.
I rather like having a MANIFEST for ZODB releases, because I use it to double-check what's in the release. It prevents stray files -- extra cvs revisions, backups, etc. -- from getting into a release. It also gives me a good way to check what's different from one release to the next; I keep MANIFEST in CVS and regenerate it every time I do a release. In fact, we created a MANIFEST for some Windows installer we did, even though they don't use distutils.
Jeremy