-
Notifications
You must be signed in to change notification settings - Fork 12
Bug 701219 - swap os.system calls for idiomatic python calls #3
Conversation
This looks good to me. I will leave it to Henrik to run and see if it works. |
Added the fix for bug 700469 too by accident. Sorry about that. |
Thanks for those patches BYK. I have taken a look at those and I would kinda like to the the following remaining tasks done.
Otherwise it looks good, but I can't give response to its functionality because I haven't tested the patch yet. |
whimboo,
Thanks for the review! |
Yes, please create a separate branch. Moving over the commit should be easy. Thanks. Also sorry for the confusion regarding other platforms. You are right and I missed that. We will convert the Bash scripts to Python scripts later on. I would tend to set INFO as default logging level for this script. It's working fine for me. Redirecting to a file would be overhead IMHO. Sorry that it has been taken bit longer but our mail system was down. |
Okay, backed out the second commit. Will fix the issues you mentioned with logging in a seperate branch and create another pull-req ;) PS: No problem with the late answer and the other scripts. ;) |
@@ -0,0 +1,3 @@ | |||
.pydevproject | |||
.project | |||
*.py[co] No newline at end of file |
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.
nit: please add an empty line at the end of the file.
By end of last week I have had to push some other fixes to master, so it would require this pull request to be updated. Once it has been done I will review the patch. Sorry for the short delay. |
Burak, it would be great if we could merge your patch soon. Will you have time to update the pull request given the latest changes on master? |
Henrik, I'll try to update it today. If I can't, then we would have to wait until Friday. Does that work for you? |
Sure, sounds fine! |
Made the merge, waiting for feedback! =) |
|
||
print "Copy template files into environment" | ||
os.system("xcopy /S /I /H %s %s" % (template_dir, env_dir)) | ||
shutil.copytree(template_dir, env_dir, True) |
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.
This line always fails for me with the following error:
Copy template files into environment
Traceback (most recent call last):
File "Z:\data\code\mozmill-environment\windows\build.py", line 87, in
shutil.copytree(template_dir, env_dir, True)
File "C:\Python27\lib\shutil.py", line 174, in copytree
os.makedirs(dst)
File "C:\Python27\lib\os.py", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 183] Cannot create a file when that file already exists: 'Z
:\data\code\mozmill-environment\windows\mozmill-env'
It happens because we already have created the env folder with the installation of MSYS.
I have to wait with further testing until the above mentioned issue has been fixed. Also it looks like that this branch is still not on top of origin/master. |
We really want to have it fixed soon. Byk, if you do not have the time to work on this pull request, please make a note and we will finish up the patch. Thanks. |
Thanks Burak for the link. It looks good to me. Can you please ensure to update the pull request by merging the latest changes from master? It looks like its still behind because I can't automatically merge it. Once it is done I will do another testrun. Sorry for the delay in my answer but I was on vacation. |
@whimboo it was up to date and I also checked again to ensure it. GitHub sometimes cannot automatically merge even the simplest pull requests. I don't know how to make it so. |
@BYK something is clearly wrong and I can't even apply the patch to head locally $ curl https://github.com/whimboo/mozmill-environment/pull/3.diff >_patch I highly assume that this is the reason why github is not able to merge it. |
I think you are right. Can you share that .rej file with me so I can investigate it further? |
I would propose that you do a clean clone and apply the patch file as given above. I have already deleted all those files from my local disk. sorry. |
@whimboo I realized that I left some changes out. I merged them and tested the script. Hopefully it will merge without problems right now. If you would like to check it before merge, you can get a clone directly from my repo. |
|
||
print "Deleting pre-compiled Python modules and build folder" | ||
os.system("del /s /q %s\\*.pyc" % (python_dir)) | ||
os.system("rd /s /q %s\\build" % (env_dir)) | ||
remove_files(os.path.join(python_dir, "*.pyc")) |
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.
So I have checked the whole process and found a remaining issue with cleaning up the target folder from compiled scripts. With this change we do no longer remove those files. It results in:
-rw-r--r-- 1 henrik staff 12354881 Feb 15 15:18 1.5.9-win.zip
-rw-r--r-- 1 henrik staff 14285529 Mar 1 13:59 1.5.9-win-new.zip
So please fix the remove_files call.
Looks good. Thanks for the updates. |
Bug 701219 - swap os.system calls for idiomatic python calls
This changeset should fix the bug 701219 on Bugzilla