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

Skip to content

Strip out pkg-config machinery for agg and libqhull. #11984

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

Merged
merged 1 commit into from
Oct 12, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 30, 2018

We need a patched version of agg so the pkg-config check is useless; it
will always fail.
qhull doesn't actually ship valid pkg-config information so the check
will likewise always fail. (qhull/qhull#22)

In both cases, just force the use of the vendored version.

Again, this helps #9737 (_check_for_pkg_config calls check_include_file which again tries to list the include dirs, which should really be the job of the compiler).

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added the Build label Aug 30, 2018
@tacaswell tacaswell added this to the v3.1 milestone Aug 30, 2018
@mdboom
Copy link
Member

mdboom commented Aug 30, 2018

In the case of Agg, the Debian packagers really wanted the ability to link against the system version. Of course, now we have patches that will probably never be merged upstream, so a local copy is the best we can do. Maybe just add a comment to the effect of "We always use the local copy because it contains required patches not available upstream."

We need a patched version of agg so the pkg-config check is useless; it
will always fail.
qhull doesn't actually ship valid pkg-config information so the check
will likewise always fail.

In both cases, just force the use of the vendored version.
@anntzer
Copy link
Contributor Author

anntzer commented Aug 30, 2018

Done.
If we somehow, someday, become again compatible with upstream agg, then we can always think about reverting this... frankly I don't think it's going to happen any time soon.

@QuLogic
Copy link
Member

QuLogic commented Aug 31, 2018

I don't have a problem with dropping support for external Agg; I gave up trying to take our changes and patch the system Agg because there are just so many. Fedora no longer builds against system Agg either.

For qhull, we force the use of the system copy because the pkg-config file was broken, so as long as a patch like that continues to work, it should be okay.

@anntzer
Copy link
Contributor Author

anntzer commented Aug 31, 2018

Patching add_flags in the same way will keep working (and you can patch back check() or not, depending on how much output you want).

@tacaswell
Copy link
Member

attn @sandrotosi

@anntzer
Copy link
Contributor Author

anntzer commented Sep 4, 2018

Actually debian isn't even devendoring qhull these days (from looking at their patches). I could consider adding support for $MPLBUILD_FORCE_SYSTEM_QHULL=1 (for example) to force using the system copy (basically @QuLogic's patch) ("you're on your own to check that qhull is recent enough"), if that avoids duplicating the code across distros...

@tacaswell
Copy link
Member

👍 to adding such a flag, but it is unfortunate that it has the opposite polarity of MLPLOCALFREETYPE.

@anntzer
Copy link
Contributor Author

anntzer commented Sep 4, 2018

Let's leave that as a separate issue. (I don't think we can do much about the opposite polarities unless you want to make local freetype the default... which may not be such a horrible choice (??))

Or we can make it only available from setup.cfg, which should be enough for packagers, and there it can have whatever default and polarity we want.

Edit: Actually I also have a plan to replace setup.cfg by something like mplsetup.py, which would both 1) avoid the dance we have to do right now regarding setup.cfg (because we more or less break distutils' expectations regarding setup.cfg, see also the hacks re: versioneer) and 2) simplify its parsing, ehm, exec()ing. But again that's a discussion for another day.

@anntzer
Copy link
Contributor Author

anntzer commented Sep 27, 2018

Re-pinging @QuLogic @sandrotosi. Thanks in advance for your input.

@QuLogic
Copy link
Member

QuLogic commented Oct 4, 2018

My comments are the same as before, so I think everything's fine?

@anntzer
Copy link
Contributor Author

anntzer commented Oct 4, 2018

@tacaswell Can we move forward on this? If this causes problems for @sandrotosi to package on Debian we can always revisit...

@tacaswell tacaswell merged commit d486866 into matplotlib:master Oct 12, 2018
@anntzer anntzer deleted the pkgconfigless branch October 12, 2018 08:15
@sandrotosi
Copy link
Contributor

sorry for not replying first, got busy -- it's all fine for Debian, we indeed use the bundled Agg

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.

5 participants