473,756 Members | 5,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

distutils uninstall

I've been trying to figure out whether there are any plans to add an
"uninstall" feature to the Python distutils. Googling has found
several people posting the same question, but, to the best of my
knowledge, no answers.

Can anyone tell me whether this has been proposed before? Thanks in
advance.
Jul 18 '05 #1
3 4980

Rick> I've been trying to figure out whether there are any plans to add
Rick> an "uninstall" feature to the Python distutils. Googling has found
Rick> several people posting the same question, but, to the best of my
Rick> knowledge, no answers.

This has been proposed before. It's not a trivial problem though.
Distutils would need to record all the files and directories it creates
during installation and carefully remove stuff during the uninstall process
(do things "backwards" , not remove directories which still contain files,
etc). That wouldn't be foolproof though, because unlike packaging systems
such as Red Hat's RPM, you don't have a full system picture. What if your
distutils-installed package provides a new version of /etc/magic? If you
uninstall it, /etc/magic would be deleted, since distutils couldn't tell
that /etc/magic was actually used by many other parts of the system.

Skip
Jul 18 '05 #2
Rick Muller wrote:
I've been trying to figure out whether there are any plans to add an
"uninstall" feature to the Python distutils. Googling has found
several people posting the same question, but, to the best of my
knowledge, no answers.


As Skip explains: no. Instead, use a bdist_ command, then use the
uninstall mechanism of the binary packaging technology (e.g. wininst,
rpm).

There are some complaints that bdist-generated packages don't properly
uninstall either (e.g. may not remove directories properly);
contributions are welcome.

Regards,
Martin

Jul 18 '05 #3
Skip Montanaro <sk**@pobox.com > wrote in message news:<ma******* *************** *************** *@python.org>.. .
Rick> I've been trying to figure out whether there are any plans to add
Rick> an "uninstall" feature to the Python distutils. Googling has found
Rick> several people posting the same question, but, to the best of my
Rick> knowledge, no answers.

This has been proposed before. It's not a trivial problem though.
Distutils would need to record all the files and directories it creates
during installation and carefully remove stuff during the uninstall process
(do things "backwards" , not remove directories which still contain files,
etc). That wouldn't be foolproof though, because unlike packaging systems
such as Red Hat's RPM, you don't have a full system picture. What if your
distutils-installed package provides a new version of /etc/magic? If you
uninstall it, /etc/magic would be deleted, since distutils couldn't tell
that /etc/magic was actually used by many other parts of the system.

Skip


Thanks for the reply, Skip.

I actually had a simpler case in mind, that you go to the directory
from which you installed the software, and typed 'setup.py uninstall',
since the setup.py script should be able to determine which files it
originally installed, and remove them.

Certainly not foolproof, but it may be useful all the same.
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1115
by: William Trenker | last post by:
I believe I recently read that distutils is in the process of being enhanced. Is that correct? Does anyone know if their is an "uninstall" command in the works for distutils? Thanks, Bill
5
1879
by: Lonnie Princehouse | last post by:
I'm in a situation where I need to distribute several interdependent Python packages. There are good reasons not to combine them all into one package. Distutils doesn't seem to be able to bundle a heterogeneous mix of multiple packages and modules, and so I've currently got people launching three installers in the proper sequence in order to get software installed, which seems needlessly complicated and confusing. There must be a better...
1
2655
by: Mathieu Malaterre | last post by:
Hello, I thought this would be easy but I guess I didn't get the distutil feeling. I am trying to write a setup for install my package but I don't understand how to do that. organisation: setup.py /bin/
15
4123
by: Colin J. Williams | last post by:
The distutils download page has: -------------------------------------------------------- Current stable release The current stable release is Distutils 1.0.2; you can download it as: * Distutils-1.0.2.tar.gz (source distribution) (233k) * Distutils-1.0.2.zip (source distribution) (274k) * Distutils-1.0.2.win32.exe (Windows installer) (187k)
1
1718
by: Terry Hancock | last post by:
Some time ago, I got the idea that I wanted to build image resources from vector graphic originals, instead of marshalling hundreds of tiny little icon images by hand. I wrote "BuildImage" to do this for me, and so far, it works very well, so I'm trying to make it easier to use and available to more developers. There is a brief (and somewhat dated) tutorial explaining what BuildImage itself does at:
0
1873
by: Maarten Sneep | last post by:
I'm trying to build PyBison on Mac OS X, and I'm running into some problems with the distutils. Just for starters: PyBison requires Pyrex. This is not a problem, and Pyrex seems to work without problems, at least the primes sample module shows a nice 25 to 30 fold speed increase over the pure python version. I used the distutils to create the module from the primes.pyx sample, following the setup.py from the PyBison distrubution:
1
2155
by: George van den Driessche | last post by:
Hi folks, I'm looking at packaging a project I'm working on using distutils. The project is for Windows and contains a COM server which needs registration, so the installer needs to be a little more complicated than usual. Looking at the options for the bdist_wininst command to distutils, I see it's possible to specify --install-script=<myinstallscript> which ought to do the trick. But to use this, myinstallscript itself must first be...
2
1163
by: boxy440 | last post by:
Hi, When I want to install a package in 2 steps, first building in a separate build dir (say, --build-base=~/temp/build_foo), then installing in my own packages directory (usually, --home=~/opt), for the install phase, how does setup.py know I've already run the build? That is, when I tell setup.py to install, how does it know that I previously ran a build, and where to find those build products?
1
1333
by: timw.google | last post by:
Hi all. I have a package that uses other packages. I created a setup.py to use 'try:' and import to check if some required packages are installed. I have the tarballs and corresponding windows installers in my sdist distribution, so if I untar my source distribution and do 'python setup.py install', the script either untars the subpackages to a tmp directory and does an os.system('python setup.py install') (Linux), or...
0
9454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9868
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9707
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3804
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3352
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2664
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.