Skip to content

Please restore --owner= and --group= options to setuptools' sdist command #1893

@zackw

Description

@zackw

Tar archives record the Unix ownership (user and group) of each file they contain. This can cause undesirable variation between source tarballs generated from the same VCS checkout but in different build environments, so distutils.command.sdist.sdist has options --owner=[username] and --group=[groupname] to override the recorded ownership. However, setuptools.command.sdist.sdist supersedes the user_options array of its parent class and makes most of the options inaccessible, including --owner and --group.

Please restore these options. The simplest change to achieve this would be to copy the --owner and --group array entries from distutils.command.sdist.sdist.user_options to setuptools.command.sdist.sdist.user_options. I have written a monkeypatch in my setup.py that does exactly this, so I can confirm that no other changes to setuptools' code are required. However, a more future-proof change would be to have setuptools.command.sdist.sdist copy its parent class's user_options array and remove only those entries that are definitely not wanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions