Issue189

Title Standalone mode does not work on OSX with homebrew python
Priority bug Status resolved
Superseder Nosy List cbenhagen, kayhayen
Assigned To cbenhagen Keywords macos, standalone

Created on 2015-04-06.18:11:48 by cbenhagen, last changed by kayhayen.

Files
File name Uploaded Type Edit Remove
site.py cbenhagen, 2015-04-15.21:18:33 text/x-python-script
Messages
msg1580 (view) Author: kayhayen Date: 2015-09-26.10:41:57
I think this has been addressed in the mean time. Putting to resolved.
msg1246 (view) Author: kayhayen Date: 2015-05-01.10:18:01
The issue was reported with site.py from a Windows user too. No reply from you yet. I 
have no clue, what this site.py is good for, when all it seems to do is to load 
another one, it would have.
msg1186 (view) Author: kayhayen Date: 2015-04-16.07:03:55
Wow, that is bizarre. It seems to make a manual search in the sys.path for 
"site" module, that is not itself, removing PYTHONPATH variable contributions, 
and then to load it. I fail to find any other function, which begs the question, 
why it exists.

Can you clarify that for me, with the Homebrew people. Does it stop to work, if 
you move that file away? How come.

Anyway, Nuitka wouldn't include the "site" module that comes second in the path, 
in standalone mode, and actually we cannot right now. Workarounds can be thought 
of, but it would be better if they have any reasons to start off.

On the plugin level, we could e.g. recognize the site module of yours, and 
replace it with one that is e.g. the merged site.py instead.
msg1180 (view) Author: cbenhagen Date: 2015-04-15.21:18:33
sure
msg1179 (view) Author: kayhayen Date: 2015-04-15.17:52:55
Can you attach the whole site.py from the traceback, that's very strange indeed.
msg1167 (view) Author: cbenhagen Date: 2015-04-14.22:21:56
Thank you very much! It does work with --python-flag=-S

Without it I am getting:
  File "/Users/ben/Projects/nuitka-test/nuitka-test.py", line 1, in <module>
    #!/usr/bin/env python
  File "/usr/local/lib/python2.7/site-packages/site.py", line 76, in <module>
    del __boot
  File "/usr/local/lib/python2.7/site-packages/site.py", line 41, in __boot

ImportError: Couldn't find the real 'site' module

I guess this is expected?
msg1133 (view) Author: kayhayen Date: 2015-04-08.07:56:31
I have deployed a fix for this to the "factory" git branch of the official repo on 
nuitka.net, the usual cautions apply. It's going to be in the next pre-release or 
hotfix release if I find any reason to do one soon.

Yours,
Kay
msg1128 (view) Author: cbenhagen Date: 2015-04-06.18:11:48
Traceback (most recent call last):
  File "/usr/local/bin/nuitka", line 176, in <module>
    MainControl.main()
  File "/usr/local/lib/python2.7/site-packages/nuitka/MainControl.py", line 663, in main
    for early_import in detectEarlyImports():
  File "/usr/local/lib/python2.7/site-packages/nuitka/freezer/Standalone.py", line 473, in detectEarlyImports
    result = _detectImports(import_code, False)
  File "/usr/local/lib/python2.7/site-packages/nuitka/freezer/Standalone.py", line 326, in _detectImports
    is_late     = is_late
  File "/usr/local/lib/python2.7/site-packages/nuitka/freezer/Standalone.py", line 140, in _detectedPrecompiledFile
    is_late     = is_late
  File "/usr/local/lib/python2.7/site-packages/nuitka/freezer/Standalone.py", line 205, in _detectedSourceFile
    compile(source_code, filename, "exec")
  File "/usr/local/lib/python2.7/site-packages/site.py", line 1
    __file__ = (__nuitka_binary_dir + '/site.py') if '__nuitka_binary_dir' in dict(__builtins__ ) else '<frozen>';def __boot():
                                                                                                                    ^
SyntaxError: invalid syntax


OSX 10.10.2
Python 2.7.9 (installed via homebrew)
nuitka 0.5.12 (installed via pip)


How can i help you track this down?
History
Date User Action Args
2015-09-26 10:41:57kayhayensetstatus: chatting -> resolved
messages: + msg1580
2015-05-01 10:18:01kayhayensetmessages: + msg1246
2015-04-20 08:09:44kayhayensetassignedto: kayhayen -> cbenhagen
2015-04-16 07:03:55kayhayensetstatus: testing -> chatting
messages: + msg1186
2015-04-15 21:18:33cbenhagensetfiles: + site.py
messages: + msg1180
2015-04-15 17:52:55kayhayensetmessages: + msg1179
2015-04-14 22:21:56cbenhagensetmessages: + msg1167
2015-04-08 07:56:31kayhayensetstatus: unread -> testing
assignedto: kayhayen
messages: + msg1133
keyword: + standalone, macos
nosy: + kayhayen
2015-04-06 18:11:48cbenhagencreate