File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,20 @@ def build_extensions(self):
192
192
package .do_custom_build (env )
193
193
return super ().build_extensions ()
194
194
195
+ def build_extension (self , ext ):
196
+ # When C coverage is enabled, the path to the object file is saved.
197
+ # Since we re-use source files in multiple extensions, libgcov will
198
+ # complain at runtime that it is trying to save coverage for the same
199
+ # object file at different timestamps (since each source is compiled
200
+ # again for each extension). Thus, we need to use unique temporary
201
+ # build directories to store object files for each extension.
202
+ orig_build_temp = self .build_temp
203
+ self .build_temp = os .path .join (self .build_temp , ext .name )
204
+ try :
205
+ super ().build_extension (ext )
206
+ finally :
207
+ self .build_temp = orig_build_temp
208
+
195
209
196
210
def update_matplotlibrc (path ):
197
211
# If packagers want to change the default backend, insert a `#backend: ...`
You can’t perform that action at this time.
0 commit comments