{"action":"created","issue":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1596","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1596/labels{/name}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1596/comments","events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1596/events","html_url":"https://github.com/pyinstaller/pyinstaller/pull/1596","id":111065975,"number":1596,"title":"Fix collect submodules","user":{"login":"bjones1","id":2125584,"avatar_url":"https://avatars.githubusercontent.com/u/2125584?v=3","gravatar_id":"","url":"https://api.github.com/users/bjones1","html_url":"https://github.com/bjones1","followers_url":"https://api.github.com/users/bjones1/followers","following_url":"https://api.github.com/users/bjones1/following{/other_user}","gists_url":"https://api.github.com/users/bjones1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjones1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjones1/subscriptions","organizations_url":"https://api.github.com/users/bjones1/orgs","repos_url":"https://api.github.com/users/bjones1/repos","events_url":"https://api.github.com/users/bjones1/events{/privacy}","received_events_url":"https://api.github.com/users/bjones1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-12T22:17:07Z","updated_at":"2015-10-13T14:33:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1596","html_url":"https://github.com/pyinstaller/pyinstaller/pull/1596","diff_url":"https://github.com/pyinstaller/pyinstaller/pull/1596.diff","patch_url":"https://github.com/pyinstaller/pyinstaller/pull/1596.patch"},"body":"I've run into a problem in which `PyInstaller.utils.hooks.collect_submodules` fails, since its call to `is_package` returns False. Apparently, this happens because `sys.path` does not include the path given in the `pathex` .spec-file argument.\r\n\r\nThe (probably wrong) fix: ignore a False return value from `is_package`.\r\n\r\nThe tests included pass in py.test without the fix...but fail from the command line, meaning the py.test environment doesn't quite duplicate the actual execution environment. See `pyi_collect_submodules.py` for an explanation of the somewhat convoluted working on the test itself.\r\n\r\nIdeas?"},"comment":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/comments/147733492","html_url":"https://github.com/pyinstaller/pyinstaller/pull/1596#issuecomment-147733492","issue_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1596","id":147733492,"user":{"login":"bjones1","id":2125584,"avatar_url":"https://avatars.githubusercontent.com/u/2125584?v=3","gravatar_id":"","url":"https://api.github.com/users/bjones1","html_url":"https://github.com/bjones1","followers_url":"https://api.github.com/users/bjones1/followers","following_url":"https://api.github.com/users/bjones1/following{/other_user}","gists_url":"https://api.github.com/users/bjones1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjones1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjones1/subscriptions","organizations_url":"https://api.github.com/users/bjones1/orgs","repos_url":"https://api.github.com/users/bjones1/repos","events_url":"https://api.github.com/users/bjones1/events{/privacy}","received_events_url":"https://api.github.com/users/bjones1/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T14:33:30Z","updated_at":"2015-10-13T14:33:30Z","body":"Great! Re-using code is always better. I'll take a look when I have a moment.\r\n\r\nI just pushed changes that do a better job of reproducing PyInstaller's run conditions, by using a `--path` parameter instead of monkeypatch. The test I wrote now fails in py.test."}}