-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nrnpyenv.sh determines PYTHONHOME more robustly. #589
Conversation
Uses sys.base_prefix whenever possible Print the provenance of NRN_PYLIB. On Linux, try to figure out the NRN_PYLIB using sysconfig LIBDIR but search only in LIBDIR. Additional method using h.libpython_path()
@nrnhines : MacOS travis build with following CMake like:
fails with:
build log here . Does this work locally on your Mac? One Azure CI on MacOS while using testing wheel with brew installed python, we see here:
|
@nrnhines : I build the wheel locally and tested it on With Master:
With This PR
So the solution is working fine! We should just see what's going on with OSX with python dynamic. @wwlytton : I have stored wheels in following directory that you can try to install and see if slow startup problem is resolved:
|
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.
Good to merge!
Uses sys.base_prefix whenever possible
Print the provenance of NRN_PYLIB.
On Linux, try to figure out the NRN_PYLIB using sysconfig LIBDIR but
search only in LIBDIR.
Additional method using h.libpython_path()
This only partially is an alternative to #560 and partially responds to #564.
Note that on my desktop, when using the system python3 I now (still) see:
Selected interesting sysconfig variables are from:
So perhaps the folder search can be usefully elaborated beyond LIBDIR since in this situation we are falling back finally to a full 'find' starting from os.file/../.. which is LIBDIR
For now I have left in the h.libpython_path() stuff for linux and mac, though it has been giving disappointing results. (it seems that a lot of python installations have libpython statically linked to the executable).