Debian Codegraph @

cairo/__init__.py

raw symbols SCIP
1 from ._cairo import * # noqa: F401,F403
2
3
4 def get_include():
5 """Returns a path to the directory containing the C header files"""
6
7 import os
8
9 def is_ok(path):
10 return os.path.exists(path) and os.path.isdir(path)
11
12 package_path = os.path.dirname(os.path.realpath(__file__))
13 install_path = os.path.join(package_path, "include")
14
15 # in case we are installed
16 if is_ok(install_path):
17 return install_path
18
19 # in case we are running from source
20 if is_ok(package_path):
21 return package_path
22
23 # in case we are in an .egg
24 import pkg_resources
25 return pkg_resources.resource_filename(__name__, "include")