-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make post install an executable module #1855
base: main
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 -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