1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
:mod:`macholib.dyld` --- Dyld emulation
=======================================
.. module:: macholib.dyld
:synopsis: Emulation of functonality of the dynamic linker
This module defines a number of functions that can be used
to emulate the functionality of the dynamic linker (``dyld``)
w.r.t. looking for library files and framworks.
.. function:: dyld_image_suffix([env])
Looks up the suffix to append to shared library and
framework names and returns this value when found.
Returns ``None`` when no suffix should be appended.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
See the description of ``DYLD_IMAGE_SUFFIX`` in the
manual page for dyld(1) for more information.
.. function:: dydl_framework_path([env])
Returns a user-specified framework search path,
or an empty list when only the default search path
should be used.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
See the description of ``DYLD_FRAMEWORK_PATH`` in the
manual page for dyld(1) for more information.
.. function:: dyld_library_path([env])
Returns a user-specified library search path,
or an empty list when only the default search path
should be used.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
See the description of ``DYLD_LIBRARY_PATH`` in the
manual page for dyld(1) for more information.
.. function:: dyld_fallback_framework_path([env])
Return a user specified list of of directories where
to look for frameworks that aren't in their install path,
or an empty list when the default fallback path should
be used.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
See the description of ``DYLD_FALLBACK_FRAMEWORK_PATH`` in the
manual page for dyld(1) for more information.
.. function:: dyld_fallback_library_path([env])
Return a user specified list of of directories where
to look for libraries that aren't in their install path,
or an empty list when the default fallback path should
be used.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
See the description of ``DYLD_FALLBACK_LIBRARY_PATH`` in the
manual page for dyld(1) for more information.
.. function:: dyld_image_suffix_search(iterator[, env])
Yields all items in *iterator*, and prepents names
with the image suffix to those items when the suffix
is specified.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
.. function:: dyld_override_search(name[, env])
If *name* is a framework name yield filesystem
paths relative to the entries in the framework
search path.
Always yield the filesystem paths relative to the
entries in the library search path.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
.. function:: dyld_executable_path_search(name, executable_path)
If *name* is a path starting with ``@executable_path/`` yield
the path relative to the specified *executable_path*.
If *executable_path* is None nothing is yielded.
.. function:: dyld_loader_search(name, loader_path)
If *name* is a path starting with ``@loader_path/`` yield
the path relative to the specified *loader_path*.
If *loader_path* is None nothing is yielded.
.. versionadded: 1.6
.. function:: dyld_default_search(name[, env])
Yield the filesystem locations to look for a dynamic
library or framework using the default locations
used by the system dynamic linker.
This function will look in ``~/Library/Frameworks``
for frameworks, even though the system dynamic linker
doesn't.
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
.. function:: dyld_find(name[, executable_path[, env [, loader]]])
Returns the path of the requested dynamic library,
raises :exc:`ValueError` when the library cannot be found.
This function searches for the library in the same
locations and de system dynamic linker.
The *executable_path* should be the filesystem path
of the executable to which the library is linked (either
directly or indirectly).
The *env* argument is a dictionary, which defaults
to :data:`os.environ`.
The *loader_path* argument is an optional filesystem path for
the object file (binary of shared library) that references
*name*.
.. versionchanged:: 1.6
Added the *loader_path* argument.
.. function:: framework_find(fn[, executable_path[, env]])
Find a framework using the same semantics as the
system dynamic linker, but will accept looser names
than the system linker.
This function will return a correct result for input
values like:
* Python
* Python.framework
* Python.framework/Versions/Current
|