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

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.
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
Copy link
Contributor Author

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

Tested, works.

@aashish24
Copy link
Contributor

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

@remram44
Copy link
Contributor Author

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

Looks like this would fix #269 and #341

@doutriaux1
Copy link
Contributor

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

doutriaux1 added a commit that referenced this pull request 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
@remram44 remram44 deleted the fixes-osx-global-pkgs branch November 20, 2014 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants