smlinux/base/python3/python3-includedirs.patch
2022-01-28 23:06:05 +05:30

17 lines
865 B
Diff

--- Python-3.7.3.orig/setup.py
+++ Python-3.7.3/setup.py
@@ -536,8 +536,12 @@
add_dir_to_list(self.compiler.library_dirs,
d)
elif is_gcc and in_incdirs and '/gcc/' not in line:
- add_dir_to_list(self.compiler.include_dirs,
- line.strip())
+ incdir = line.strip()
+ add_dir_to_list(self.compiler.include_dirs, incdir)
+ libdir = incdir.replace("/include", "/lib")
+ if libdir != incdir:
+ add_dir_to_list(self.compiler.library_dirs,
+ libdir)
finally:
os.unlink(tmpfile)