Uh oh!
There was an error while loading. Please reload this page.
Fixes Setup.py error on Windows #676 - #734
Conversation
Fixes Setup,py error on Windows, added shell script to check python environment, print the python version, copy files from /kubernetes/base to /kubernetes/ and finally runs python setup.py install
k8s-ci-robot
commented
Jan 21, 2019
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Sai-Adarsh If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Sai-Adarsh
commented
Jan 21, 2019
@micw523 gave a PR. could you check this out. |
Sai-Adarsh
commented
Jan 21, 2019
/assign @roycaihw |
Sai-Adarsh
commented
Jan 21, 2019
/assign @micw523 |
k8s-ci-robot
commented
Jan 21, 2019
@Sai-Adarsh: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
k8s-ci-robot
commented
Jan 21, 2019
@Appendly: changing LGTM is restricted to assignees, and only kubernetes-client/python repo collaborators may be assigned issues. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| echo Python environment found.. | ||
| fi | ||
| python --version | ||
| cp -R ../kubernetes/base/* ../kubernetes/ |
There was a problem hiding this comment.
what's the reason to do the 'cp -R' above?
There was a problem hiding this comment.
what's the reason to do the 'cp -R' above?
"When we clone submodule with git the folders in the /kubernetes/base is supposed to be symbolically linked in the /kubernetes directory. In Windows this is not done. For a Windows developer, we’ll need to have a script copying all the base/* folders into */. "
^ is what @micw523 requested in his issue. so 'cp -R' does the job.
| @@ -0,0 +1,11 @@ | |||
| if ! [ -x "$(command -v python)" ]; | |||
| then | |||
| echo Python environment notfound.. | |||
There was a problem hiding this comment.
probably add double quotes around the echo string
| then | ||
| echo Python environment notfound.. | ||
| else | ||
| echo Python environment found.. |
There was a problem hiding this comment.
ditto
cool. will do the necessary changes
There was a problem hiding this comment.
| echo Python environment found.. | |
| echo Python environment found. |
Uh oh!
There was an error while loading. Please reload this page.
| echo "Python environment notfound.." | ||
| else | ||
| echo "Python environment found.." | ||
| fi |
There was a problem hiding this comment.
Please check windows batch scripting syntax for if
micw523
commented
Jan 22, 2019
To be honest this looks like bash instead of a Windows bat. You could probably use it in a Cygwin but I think Windows developers would prefer a genuine bat. |
Sai-Adarsh
commented
Jan 24, 2019
@micw523 done with the changes. could you check on the new commit :) |
micw523
left a comment
There was a problem hiding this comment.
I have a few comments -
- Could you break your command into several lines? It is difficult to decipher at its current state
- xcopy is considered an external program and has been deprecated since '07. Could you try using copy or robocopy?
Sai-Adarsh
commented
Jan 24, 2019
done with the changes. |
| @@ -0,0 +1,5 @@ | |||
| ( where python >null | |||
| echo Python environment found.. | |||
There was a problem hiding this comment.
In this case Python environment found will be printed regardless.
There was a problem hiding this comment.
python > nullandfound.
cool. done with the changes.
micw523
left a comment
There was a problem hiding this comment.
Please fix your indents - the conditional statements are not aligned.
Also, one period for output message is sufficient.
On the last line ../ - the slash is not needed and on Windows you're supposed to use backslash anyway so cd .. should be good enough
Sai-Adarsh
commented
Jan 24, 2019
done. |
Sai-Adarsh
commented
Jan 28, 2019
done with changes. |
micw523
commented
Jan 28, 2019
/lgtm |
roycaihw
left a comment
There was a problem hiding this comment.
/hold
Please add comments in the bat describing what it's for. Probably also name the file "windows-setup-fix.bat" to make it more clear. LGTM otherwise
| @@ -0,0 +1,6 @@ | |||
| ( python --version>nul 2>&1 && ( | |||
| echo Python environment found. | |||
There was a problem hiding this comment.
just out of curiosity: was the double quote change @yliaog suggested reverted for some reason?
There was a problem hiding this comment.
just out of curiosity: was the double quote change @yliaog suggested reverted for some reason?
works fine without double qoute, so thought of reverting the change :)
Sai-Adarsh
commented
Jan 29, 2019
cool. |
k8s-ci-robot
commented
Jan 29, 2019
New changes are detected. LGTM label has been removed. |
Sai-Adarsh
commented
Jan 29, 2019
@roycaihw could you check on the new changes? |
roycaihw
commented
Jan 29, 2019
Could you add the comments to the beginning of the file? Basically I was asking for a description so that people can tell what it's for and when it should be used. I think we don't need inline comments. Something like "Install python client in Windows. Windows doesn't have symbolic link that this repo uses. This batch script provides a workaround for symbolic link by copying the folders over." Also please squash your commits before submit /hold cancel |
micw523
commented
Feb 7, 2019
Will lg()tm after squash |
Sai-Adarsh
commented
Feb 13, 2019
cool. |
Would like to join a GitHub team of kubernetes-client, and highly interested to join as a reviewer. Have previously merged a fix (kubernetes-client#734).
Fixes Setup.py error on Windows, added shell script to check python environment, prints the python version, copy files from /kubernetes/base to /kubernetes/ and finally runs python setup.py install issue #676