[Distutils] CVS/Entries.Log ignored by setuptools default CVS file-finder logic

Jeff Shell eucci.group at gmail.com
Mon Aug 6 15:57:50 CEST 2007

Hi. I'm trying to update our internal code to use distutils/setuptools
at long last. We work heavily in Zope 3, so our packages contain many
"data" files (ZCML, Page Templates, Javascript, CSS, etc). All of our
internal code is maintained in CVS.

I noticed that using ``include_package_data = True`` was having little
or no effect: at most, only data files in the root directory might be
included. This seems to be related to our directories being listed in
`CVS/Entries.Log` instead of `CVS/Entries`, and setuptools doesn't
read this file. I don't know why our directories are in this file:
these are fresh checkouts (retrieved over the network using :ext: and
SSH) with no local changes having yet been applied.

Apparently programs that are reading 'Entries' should also read
'Entries.Log', which is slightly different from Entries. I have more
details below. Is there any particular reason why this file isn't
being read? I'd be surprised if I'm the only one encountering this

A basic fix appears to be easy: add another `re_finder` for
`CVS/Entries.Log` with a regex like ``^A\s\w?/([^/]+)/``. I'm sure I
could add something like this with an entry-point and our own egg, but
it seems ridiculously small for us to maintain internally.


I traced this issue down to setuptools/command/sdist.py and the
default set of finders::

    finders = [
            re_finder(re.compile(r"^\w?/([^/]+)/", re.M))),
        (convert_path('.svn/entries'), entries_finder),
        (convert_path('.svn/dir-props'), externals_finder),
        (convert_path('.svn/dir-prop-base'), externals_finder),  # svn 1.4

That looked right to me. Then I looked in a CVS directory in a couple
of different packages and looked at Entries::

    CVS> cat Entries
    /__init__.py/1.1/Thu Aug 18 23:29:21 2005//Tfixup-branch
    /addhelp.py/ Dec 20 22:55:09 2006//Tfixup-branch
    /configure.zcml/ Jul 18 19:32:51 2007//Tfixup-branch
    # .... (more lines - no directories)
    /tests.py/ Jan 18 22:10:50 2007//Tfixup-branch
    /traversing.py/ Mar 20 23:29:36 2007//Tfixup-branch
    /valuelib.py/ Jul 27 20:26:38 2007//Tfixup-branch

Hmmm, no directories... Then I noticed an "Entries.Log" file. I looked at that::

    CVS> cat Entries.Log
    A D/authentication////
    A D/batching////
    # ... (more lines, all directories, all lines beginning with ``A D``)
    A D/undo////

Whoa! Here are all of the directories! I'm not sure why these are in
there - this is showing up in a fresh code checkout, and it's showing
up regardless of whether the checked out code is a branch or not.

This is showing up on Mac OS X with the CVS that comes with the
development tools package.

    CVS> cvs --version
    Concurrent Versions System (CVS) 1.11.18 (client/server)

Our server has ``1.11.1p1``. I don't know if these version numbers
mean anything in relation to this issue. Does anybody else?

Anyways, the CVS manual says this about Entries.Log::

> Programs which are reading the 'Entries' file should also check
> for 'Entries.Log'...The format of a line in 'Entries.Log' is
> a single character command followed by a space followed by a line in
> the format specified for a line in 'Entries'. The single character
> command is 'A' to indicate that the entry is being added, 'R'
> to indicate that the entry is being removed, or any other character to
> indicate that the entire line in 'Entries.Log' should be silently
> ignored (for future expansion).


So, it looks like a decent solution would be to add another
`re_finder` in setuptools' `sdist.py` module as mentioned above that
took the Entries.Log file and format into account.... Yes?

Jeff Shell

More information about the Distutils-SIG mailing list