Skip to content
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

Patches Python to remove global OSX packages #831

Merged
merged 3 commits into from Oct 22, 2014

Conversation

@remram44
Copy link
Contributor

@remram44 remram44 commented Oct 21, 2014

On Mac OS X only, if Python is built as a framework, site.py loads packages from /Library/... into sys.path. This is not what we want, UV-CDAT builds and uses its own libraries.

This disables it by patching Python's site.py before installation.

(needs testing)

@remram44 remram44 added this to the 2.1 milestone Oct 21, 2014
@remram44 remram44 self-assigned this Oct 21, 2014
Path to cmake command might include spaces.
@remram44 remram44 force-pushed the fixes-osx-global-pkgs branch from ed84a27 to 77f6e33 Oct 21, 2014
remram44 added 2 commits Oct 21, 2014
On Mac OS X only, if Python is built as a framework, site.py loads
packages from /Library/... into sys.path.

This disables it by patching site.py before installation.
@remram44 remram44 force-pushed the fixes-osx-global-pkgs branch from 77f6e33 to 70299d2 Oct 21, 2014
@remram44
Copy link
Contributor Author

@remram44 remram44 commented Oct 21, 2014

The patch step for setup.py didn't work at all on OS X, because the @CMAKE_COMMAND@ contains spaces (/Applications/CMake 2.8-12.app/...). c3c799d fixes that.

@remram44
Copy link
Contributor Author

@remram44 remram44 commented Oct 21, 2014

Tested, works.

@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Oct 22, 2014

Thanks @remram44 what lined you changed in site.py?

@remram44
Copy link
Contributor Author

@remram44 remram44 commented Oct 22, 2014

I just commented out the special case for OS X and frameworks in getsitepackages():

https://gist.github.com/remram44/ddad605c91744df91ac7/revisions

@remram44
Copy link
Contributor Author

@remram44 remram44 commented Oct 22, 2014

Looks like this would fix #269 and #341

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Oct 22, 2014

ok i will ask sam to test it here it will merge upon success. Thanks!

doutriaux1 added a commit that referenced this issue Oct 22, 2014
Patches Python to remove global OSX packages
Ok Sam confirmed it works for him.
@doutriaux1 doutriaux1 merged commit aadef57 into CDAT:master Oct 22, 2014
1 check passed
@remram44 remram44 deleted the fixes-osx-global-pkgs branch Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants