Skip to content

Distutils should provide an uninstall command #48923

Closed

Description

@agbuckley
mannequin
BPO 4673
Nosy @giampaolo, @tarekziade, @merwok, @abadger, @agbuckley

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tarekziade'
closed_at = <Date 2011-07-04.14:35:14.849>
created_at = <Date 2008-12-15.22:28:53.801>
labels = ['type-feature']
title = 'Distutils should provide an uninstall command'
updated_at = <Date 2011-07-04.14:35:14.847>
user = 'https://github.com/agbuckley'

bugs.python.org fields:

activity = <Date 2011-07-04.14:35:14.847>
actor = 'eric.araujo'
assignee = 'tarek'
closed = True
closed_date = <Date 2011-07-04.14:35:14.849>
closer = 'eric.araujo'
components = ['Distutils2']
creation = <Date 2008-12-15.22:28:53.801>
creator = 'andybuckley'
dependencies = []
files = []
hgrepos = []
issue_num = 4673
keywords = ['gsoc']
message_count = 10.0
messages = ['77885', '78488', '80601', '80633', '80647', '80801', '99870', '99873', '115781', '139773']
nosy_count = 7.0
nosy_names = ['giampaolo.rodola', 'tarek', 'eric.araujo', 'a.badger', 'andybuckley', 'philobyte', 'alexis']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue4673'
versions = ['Python 3.3']

Activity

  1. agbuckley commented on Dec 15, 2008

    agbuckleymannequin
    MannequinAuthor

    It would make package maintenance easier, as well as integration with
    other build systems e.g. autotools (necessary for projects where not
    everything is Python), if the distutils supported an uninstallation
    command, e.g.

    python setup.py uninstall

    This would presumably require monitoring of which files were installed
    where, and it's of course possible to do undesirable things, but exactly
    the same counter-arguments exist for autotools, and there the uninstall
    target is an important and useful feature for developers, once you know
    how to behave in a way to make it safe.

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancement
    on Dec 15, 2008
  3. tarekziade commented on Dec 29, 2008

    tarekziademannequin
    Mannequin

    This would require a detailed description on how such a feature would work.

  4. philobyte commented on Jan 27, 2009

    philobytemannequin
    Mannequin

    python setup.py uninstall
    should do all the same processing as 'install' but whenever it gets to
    the point of copying a file to a system destination, it should instead
    unlink the destination.

    besides the obvious use, here is another one:
    when upgrading a package, and the new version no longer includes
    certain files, just installing the new version will leave leftovers
    of the previous version installed. using uninstall beforehand will
    clean out the cruft.

  5. tarekziade commented on Jan 27, 2009

    tarekziademannequin
    Mannequin

    philobyte, this means you have to keep the source somewhere to be able
    to run setup.py uninstall. This is not handy imho.

    What about a uninstall registery in Python that keeps track of the files
    installed for each package ? this would let us have an uninstall command
    that could run on its own.

    "uninstall packagename"

  6. agbuckley commented on Jan 27, 2009

    agbuckleymannequin
    MannequinAuthor

    If an uninstall registry is feasible, the it could be neat. The
    suggested behaviour of unlinking known files based on the source
    directory is not all that inconvenient: it's by no means perfect, but it
    has its uses and is familiar to many, since it is how GNU autotools behaves.

  7. tarekziade commented on Jan 30, 2009

    tarekziademannequin
    Mannequin

    I will continue to discuss this in distutils-SIG:

    Marc-André Lemburg proposed me to introduce the uninstall command from
    mxSetup.py (from mxBase, http://www.egenix.com/products/python/mxBase/)

    So I need to ask for opinions first

  8. self-assigned this
    on Jan 30, 2009
  9. abadger commented on Feb 22, 2010

    abadgermannequin
    Mannequin

    We're working on this as part of the distutils2 effort. Current distutils (version 1) will not support uninstall.

  10. abadger commented on Feb 22, 2010

    abadgermannequin
    Mannequin

    Targetting 3.3

  11. removed
    stdlibStandard Library Python modules in the Lib/ directory
    on Jun 3, 2010
  12. merwok commented on Sep 7, 2010

    @merwok
    Member

    Status update: Josip implemented PEP-376 to provide the installation database and Alexis is working on distutils2.install_tools to provide an uninstall function. User-level tools like pip can reuse this code to provide an uninstall functionality.

  13. merwok commented on Jul 4, 2011

    @merwok
    Member

    distutils2/packaging now provides a remove function and a pysetup remove command.

  14. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions