Get tests working on Windows, fix issue #11#13
Open
daybarr wants to merge 5 commits intobuildout:masterfrom
daybarr:windows-fixes
Open
Get tests working on Windows, fix issue #11#13daybarr wants to merge 5 commits intobuildout:masterfrom daybarr:windows-fixes
daybarr wants to merge 5 commits intobuildout:masterfrom
daybarr:windows-fixes
Conversation
On Windows, zc.buildout.easy_install.scripts returns a 2 element list containing py.exe and py-script.py
I think wheel.install.WheelFile isn't properly managing its handles and doesn't close the zipfile when it's done with it. Force a gc at tearDown time to clean up any references and so close the handle prior to the rmtree done by buildoutTearDown which was failing on Windows with: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\...\\_TEST_\\sample_eggs\\demo-1.0-py2-none-any.whl' Also, can't use self.register_teardown because (bug?) buildoutTearDown doesn't call the registerd functions in reverse order, so our cleanup would run *after* the rmtree call regsitered by buildoutSetup, which is too late.
Because this triggers issue #11 on Windows, so we can test that it's fixed.
Seems like it might be safer
Contributor
|
Hi @daybarr,
Have you considered opening a bug report with the |
Contributor
|
By the way, thank you for looking into this @daybarr. |
Author
It's on my to do list ;) but to be honest, is a lower priority now that I am unblocked and have something working. Hopefully will get back to it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another attempt at fixing #11 (replacing #12) that should also work for Linux builds.
cd635a9 and 502e3ad fix two issues that were preventing
bin/testfrom working on Windows.1f51489 is TDD - changes the case of the
demosample wheel toDemoso that issue #11 manifests when the tests are run on Windows, so we can test any fix.343ce30 contains the actual fix. Here we avoid the problem by monkey patching
setuptools(again - it was already done for other reasons). We now avoid the call topkg_resources.normalize_pathbecause on Windows that was lowercasing the path, which makes sense for comparison reasons if we are indeed comparing paths and they can come from different sources with different ideas of the cases used, but not if we're going to later use that path to extract important and case-sensitive information.