Make post install an executable module#1855
Make post install an executable module#1855jenshnielsen wants to merge 3 commits intomhammond:mainfrom
Conversation
So post install can be executed as `python -m win32.lib.postinstall`
d2f77a9 to
9e38efe
Compare
|
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
left a comment
There was a problem hiding this comment.
Very very sorry for the delay here, but I don't see a good reason not to go ahead with this.
| if not is_bdist_wininst: | ||
| uninstall(args.destination) | ||
|
|
||
| from win32.lib.postinstall.pywin32_postinstall import main |
There was a problem hiding this comment.
Do you mind adding a comment here explaining why this file exists at all, and how the preferred way of running it is now via -m ... etc? And ditto for the other.
| @@ -0,0 +1,3 @@ | |||
| from win32.lib.postinstall.pywin32_postinstall import main | |||
There was a problem hiding this comment.
Do we really need the postinstall intermediate dir? Any reason not to just have pywin32_postinstall.py directly in win32/Lib?
There was a problem hiding this comment.
I think this just acts as an alias for python -m win32.lib.pywin32_postinstall --> python -m win32.lib.postinstall. Not necessary imo.
Even moreso with pywin32.pth pointing to win32\lib, I think you can do python -m pywin32_postinstall
|
@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 It's probably also a good idea to update documentation referencing the postinstall script. |
|
This is something I've been considering myself now that exe installers are no longer provided, calling Ping @jenshnielsen if you're still interested in updating this PR. Otherwise I might pick it up eventually. |
|
@Avasam Sorry this dropped of my radar. Fell free to pick it up. |
As discussed in #1850 this means that you can run post install as
python -m win32.lib.postinstall -installwithout 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