I'm creating a Python package that registers a COM server after install using the approach described in Post-install script with Python setuptools. How can specify a post-uninstall (or pre-uninstall) script to unregister the COM server when the package is uninstalled?
            Asked
            
        
        
            Active
            
        
            Viewed 441 times
        
    4
            
            
        - 
                    1Possible duplicate of [Python: execute action at package uninstall](https://stackoverflow.com/questions/50088440/python-execute-action-at-package-uninstall) – phd Apr 27 '19 at 17:56
- 
                    https://stackoverflow.com/search?q=%5Bpip%5D+pre-uninstall – phd Apr 27 '19 at 17:56
- 
                    Short answer — you cannot. – phd Apr 27 '19 at 17:56
- 
                    You might be able to do that with PyInstaller or something equivalent – demberto Mar 02 '22 at 08:28
