Make post install an executable module
As discussed in https://github.com/mhammond/pywin32/pull/1850 this means that you can run post install as
python -m win32.lib.postinstall -install
without having to worry about path etc.
Let me know if this is a good location for the post install module.
Manually tested by executing pywin32_postinstall.py from the scripts module and python -m win32.lib.postinstall -install
Parsed arguments are: Namespace(install=True, remove=False, wait=None, silent=False, quiet=False, destination='C:\\Users\\Jens-work\\Miniconda3\\envs\\pywin32dev\\Lib\\site-packages')
Copied pythoncom39.dll to C:\Users\Jens-work\Miniconda3\envs\pywin32dev\pythoncom39.dll
Copied pywintypes39.dll to C:\Users\Jens-work\Miniconda3\envs\pywin32dev\pywintypes39.dll
You do not have the permissions to install COM objects.
The sample COM objects were not registered.
NOTE: PyWin32.chm can not be located, so has not been registered
Registered help file
Pythonwin has been registered in context menu
Can't install shortcuts - 'C:\\Users\\Jens-work\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Python 3.9' is not a folder
The pywin32 extensions were successfully installed.
Thanks for that! I'm a bit short on time currently and planning a new release, so I plan on looking at this after I've done that.
@mhammond Do you think you will have time to review this at some point? Happy to rebase if that is the case
@mhammond no worries I know how much work can be in maintaining an open source project. I will rebase and make the suggested changes asap
@jenshnielsen There has been changes in pywin32_postinstall.py and your PR has conflicts now.
It's probably also a good idea to update documentation referencing the postinstall script.