clean should delete SOURCES.txt

Create issue
Issue #122 open
Adam Schmalhofer created an issue clean doesn't delete foo.egg-info/SOURCES.txt. As a result Debian does this in each packages manually (otherwise as SOURCES.txt changes during the build it gets included into the debian's source-diff). I think the proper place to delete it is by distribute/setuptools itself.

Comments (12)

  1. Tarek Ziadé repo owner

    The clean command is a Distutils command, meaning that it is not aware of the existence of the .egg-info directory created by Distribute/Setuptools.

    I'd be happy to include a custom one in Distribute. One question though: why removing only SOURCES.txt ? the "foo.egg-info" directory is fully created at build time, meaning that we can safely remove it by calling clean.

  2. Adam Schmalhofer reporter

    Thanks for the quick reply. Sure that would be great. Delete the directory. SOURCES.txt was just the file that was causing problems.

  3. Ben Finney

    Thanks for the quick response, Tarek.

    I wonder, though, what use the egg-info directory has in the source distribution at all? It seems bizarre to create it for distribution, then throw it away when actually building or installing.

    Would a better solution be to simply not *create* the egg-info directory for an sdist command?

  4. Adam Schmalhofer reporter

    @Ben Finney

    That wouldn't solve the problem (it would actually make it worse). Then SOURCES.txt and other generated files would be included into debian's diff (if not explicitly deleted in each debian package; on second builds). If you consider foo.egg-info in sdist to be a problem (I don't) please file a separate bug report.

  5. Tarek Ziadé repo owner

    @Anonymous : those custom files *are* autogenerated by the egg_info command each time sdist is called. It uses the writers registered as entry poitns for that. So fully removing this directory is not a problem as far as I can see.

    So if everyone agrees, I propose to remove .egg-info altogether when the clean command is called.

  6. Adam Schmalhofer reporter

    More then a month passed and nobody objected. I think this should count as everyone agrees ;-). Sorry if this feels a bit pushy; I just don't want this to be stalled, unnecessarily.

  7. Tarek Ziadé repo owner
    • removed assignee

    I am currently very busy on distutils, and I can't devote time right now on this. If you have some time to do it, I'd be happy to review then include a patch

  8. Adam Schmalhofer reporter

    Do you have a Pointer for extending distribute? I tried to add a command called cleaned by copying command/ to command/; renamed class register to class cleaned in and added 'cleaned' to all in


    $ python2.6 cleaned
    Error: invalid command 'cleaned'

    "$ python2.6 register" works and cleaned does import:

    >>> from setuptools.command import cleaned
    >>> dir(cleaned)
    ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '_register', 'cleaned']

    So I am very stuck.

  9. Former user Account Deleted

    Are there any news on this? One year has passed, but "myname.egg-info" dir still annoys by its existence after ` clean`.

  10. Former user Account Deleted
  11. Log in to comment