Skip to content
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

postinstall: Adding argument parser and further fixes for user install #1396

Merged
merged 11 commits into from
Sep 7, 2019

Conversation

thopiekar
Copy link
Contributor

While working on #1391 I managed to fix the user install and replaced the own implementation of an argument parser with argparse. Among that I just added some simple checks to prevent bad input.

However, the CI testing isn't finished and hangs still. Therefore, I'm providing these changes separately, too.
It is recommended to merge these efforts together with #1392 to get full user install support.

Most of it was needed to run the script directly with Py3. Some other changes were made just because it felt like sand in my eyes..
Gives more control over the options and added checks to prevent wrong input early.
This way we can pass the correct installation location to the postinstall script.
After commiting the previous commit, I just noticed that prefix is not correct. Believe that install_lib should have the correct location to the site-packages directory, where we did our install.
Only one of both is needed.
@thopiekar thopiekar changed the title postinstall: Adding argument parser and fixes for user install postinstall: Adding argument parser and further fixes for user install Aug 25, 2019
Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome, thanks. I can't see where setup.py forces the short-name, so do we need to quote the destination arg?

setup.py Outdated Show resolved Hide resolved
Tested it before, but noticed that it the negation was missing.
Without paths with whitespaces won't be found.
Found by @mhammond while reviewing mhammond#1396.
@thopiekar thopiekar requested a review from mhammond September 6, 2019 21:53
@mhammond mhammond merged commit 9d6d50f into mhammond:master Sep 7, 2019
vernondcole pushed a commit to vernondcole/pywin32 that referenced this pull request Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants