Thanks to visit codestin.com
Credit goes to github.com

Skip to content

setupext.py needs more --prefix #3821

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

Closed
WeatherGod opened this issue Nov 21, 2014 · 5 comments
Closed

setupext.py needs more --prefix #3821

WeatherGod opened this issue Nov 21, 2014 · 5 comments
Labels

Comments

@WeatherGod
Copy link
Member

When using Anaconda, but installing matplotlib from source, using the tkagg backend can result in a segfault or sometimes just simply an exception with no figure shown. After some investigation, the root cause was that the build of _tkagg.so was being built and linked against the system's Tk/Tcl libraries and headers. However, when backend_tkagg.py imports Tkinter, it is importing Anaconda's build of the library, which conflicts with the compiled _tkagg.so, leading to errors.

It appears that the matplotlib conda recipe works around this issue by brute-forcing a replacement of every instance of "/usr/local/" with the Anaconda's prefix location in the setupext.py. I think we can do better than that, and make available a proper set of command-line options for various prefixes and such. And of course, to be uniform with the application of --prefix throughout setupext.py.

@jenshnielsen
Copy link
Member

This is somewhat related to the issues with freetype on Mac when there is no package config avail.

This is what #3713 tried to solve but fails

@WeatherGod
Copy link
Member Author

There is an important subtle difference, I think. Much of the existing code in setupext.py centers around auto-detecting the needed library and header paths. And it does a decent job at that. However, it seems to me that the ability to manually specify the paths is not available (either at the gross level with a single --prefix or at a finer-grained level with something like --prefix-include-tk). I don't think it is even possible with the setup.cfg, but I am not familiar enough with the build system.

@jenshnielsen
Copy link
Member

Yes you are right that these are not identical issues. I just wanted to hookup the various issues with setupext.py

The issue with freetype is two fold. There is on support in setupext for adding another subdir to the search path without loosing the top directory.
There is also no support for overwriting the searchpath from setup.cfg afaik.

BTW: I wanted to overwrite the include path to build the gtk2 backends on my mac where homebrew has the headers in an unusual place( to allow coexistence with gtk3. ) pkg-config was broken due to an issue in homebrew so it has to manually find the headers.

@tacaswell tacaswell modified the milestone: v1.5.x Nov 25, 2014
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
@QuLogic
Copy link
Member

QuLogic commented Mar 14, 2019

@anntzer is this fixed now (other than removing any hacks in the conda recipe)?

@anntzer
Copy link
Contributor

anntzer commented Mar 14, 2019

I would think so. Closing, but feel free to reopen if needed.

@anntzer anntzer closed this as completed Mar 14, 2019
@story645 story645 removed this from the future releases milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants