tweak-setup-py.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --- Python-3.10.0/setup.py 2021-09-18 16:58:59.857000000 +0200
  2. +++ Python-3.10.0/setup.py 2021-09-18 16:59:10.448465217 +0200
  3. @@ -832,8 +832,8 @@
  4. add_dir_to_list(self.compiler.include_dirs,
  5. sysconfig.get_config_var("INCLUDEDIR"))
  6. - system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
  7. - system_include_dirs = ['/usr/include']
  8. + system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib', '/usr/local/lib']
  9. + system_include_dirs = ['/usr/include', '/usr/local/include']
  10. # lib_dirs and inc_dirs are used to search for files;
  11. # if a file is found in one of those directories, it can
  12. # be assumed that no additional -I,-L directives are needed.
  13. @@ -1144,7 +1144,12 @@
  14. # Curses support, requiring the System V version of curses, often
  15. # provided by the ncurses library.
  16. curses_defines = []
  17. - curses_includes = []
  18. + if not CROSS_COMPILING:
  19. + curses_includes = ['/usr/local/include/ncurses']
  20. + else:
  21. + curses_includes = sysroot_paths(
  22. + ('CPPFLAGS', 'CFLAGS', 'CC'), ['/usr/local/include/ncurses']
  23. + )
  24. panel_library = 'panel'
  25. if curses_library == 'ncursesw':
  26. curses_defines.append(('HAVE_NCURSESW', '1'))
  27. @@ -1849,7 +1854,12 @@
  28. def detect_uuid(self):
  29. # Build the _uuid module if possible
  30. - uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"])
  31. + if not CROSS_COMPILING:
  32. + uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid", "/usr/local/include/uuid"])
  33. + else:
  34. + uuid_incs = find_file("uuid.h", self.inc_dirs, sysroot_paths(
  35. + ('CPPFLAGS', 'CFLAGS', 'CC'), ["/usr/include/uuid", "/usr/local/include/uuid"]
  36. + ))
  37. if uuid_incs is not None:
  38. if self.compiler.find_library_file(self.lib_dirs, 'uuid'):
  39. uuid_libs = ['uuid']