diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2022-04-09 11:46:58 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2022-04-13 21:59:09 +0000 |
commit | 5f614b36b8f61caab581a56ccf320fee3177051b (patch) | |
tree | bee89a994fa2243f603814cbbc27352cfb25ab51 /gi/pyginterface.c | |
parent | 0f3ba012512acfd74e5942ff6858c22611c4a79a (diff) | |
download | pygobject-5f614b36b8f61caab581a56ccf320fee3177051b.tar.gz |
setup.py: look up pycairo headers without importing the module
Up until now pycairo provided a cairo.get_include() helper which
could be used to find the required include directory matching the module,
considering various scenarios.
Starting with 3.8 this leads to problems on Windows since CPython on Windows
will no longer use PATH for the DLL lookup and expects the library user to
explicitely pass the directory where the cairo DLL can be found.
In a build environment the user has no control over this though, so we have to
find the include directory without loading/importing pycairo again.
This now uses a combination of importlib.util.find_spec() for finding the module
and importlib.metadata.distribution() for finding the package version.
Hopefully this covers all cases.
Diffstat (limited to 'gi/pyginterface.c')
0 files changed, 0 insertions, 0 deletions