{"action":"created","issue":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/725","repository_url":"https://api.github.com/repos/GalSim-developers/GalSim","labels_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/725/labels{/name}","comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/725/comments","events_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/725/events","html_url":"https://github.com/GalSim-developers/GalSim/pull/725","id":140351118,"number":725,"title":"#721 Fix SCons for El Capitan when DYLD_LIBRARY_PATH is needed","user":{"login":"rmjarvis","id":623887,"avatar_url":"https://avatars.githubusercontent.com/u/623887?v=3","gravatar_id":"","url":"https://api.github.com/users/rmjarvis","html_url":"https://github.com/rmjarvis","followers_url":"https://api.github.com/users/rmjarvis/followers","following_url":"https://api.github.com/users/rmjarvis/following{/other_user}","gists_url":"https://api.github.com/users/rmjarvis/gists{/gist_id}","starred_url":"https://api.github.com/users/rmjarvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmjarvis/subscriptions","organizations_url":"https://api.github.com/users/rmjarvis/orgs","repos_url":"https://api.github.com/users/rmjarvis/repos","events_url":"https://api.github.com/users/rmjarvis/events{/privacy}","received_events_url":"https://api.github.com/users/rmjarvis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-12T06:02:15Z","updated_at":"2016-03-12T23:18:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/725","html_url":"https://github.com/GalSim-developers/GalSim/pull/725","diff_url":"https://github.com/GalSim-developers/GalSim/pull/725.diff","patch_url":"https://github.com/GalSim-developers/GalSim/pull/725.patch"},"body":"At the DESC hack day today, we tried to install GalSim with Anaconda Python on @cwwalter's laptop.  But we ran into a new problem introduced by El Capitan, the latest MacOS.  They decided to institute a new policy called \"System Integrity Protection\" (SIP).  Probably, this is really important for stopping terrorists from taking over the world.  But for running SCons properly, it was a big headache.\r\n\r\nBasically, SIP involved removing dangerous environment variables like LD_LIBRARY_PATH and DYLD_LIBRARY_PATH from system calls.  So within SCons, or when SCons calls system commands to see if things can run properly, it fails if you system is relying on these variables to find the right libraries at runtime.\r\n\r\nThe solution is twofold:\r\n1. Add scons options to let the user explicitly give LD_LIBRARY_PATH or DYLD_LIBRARY_PATH so SCons can set them back into its own environment after SIP has stripped them out of os.environ.  \r\n2. Wheneven SCons calls a shell command to run something, add `DYLD_LIBRARY_PATH=env['DYLD_LIBRARY_PATH']` before the command to bypass the SIP stripping that happens there.\r\n\r\nI think all this is working properly.  We got it to work on Chris's laptop before he left for the airport.  But it would be worth people quickly checking that I haven't broken anything for other systems in the process.\r\n\r\nAlso, @cwwalter, please make sure that my cleaning up of the SConstruct file from what you sent me didn't make anything stop working for you.  You should be able to do:\r\n```\r\ncd /path/to/GalSim\r\ngit pull\r\ngit checkout '#721'\r\nscons\r\n```\r\nand just make sure this still works for you.  Thanks!"},"comment":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/comments/195826905","html_url":"https://github.com/GalSim-developers/GalSim/pull/725#issuecomment-195826905","issue_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/725","id":195826905,"user":{"login":"jmeyers314","id":3650485,"avatar_url":"https://avatars.githubusercontent.com/u/3650485?v=3","gravatar_id":"","url":"https://api.github.com/users/jmeyers314","html_url":"https://github.com/jmeyers314","followers_url":"https://api.github.com/users/jmeyers314/followers","following_url":"https://api.github.com/users/jmeyers314/following{/other_user}","gists_url":"https://api.github.com/users/jmeyers314/gists{/gist_id}","starred_url":"https://api.github.com/users/jmeyers314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmeyers314/subscriptions","organizations_url":"https://api.github.com/users/jmeyers314/orgs","repos_url":"https://api.github.com/users/jmeyers314/repos","events_url":"https://api.github.com/users/jmeyers314/events{/privacy}","received_events_url":"https://api.github.com/users/jmeyers314/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T23:18:42Z","updated_at":"2016-03-12T23:18:42Z","body":">Sorry Josh. I think I figured out what I did wrong. Please try it now.\r\n\r\nThanks, that fixed it.  All tests pass."}}