0011-Override-system-locale-and-set-to-default-when-addin.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From e4ae670e3489544a49dabd1618c32fe73504a7ba Mon Sep 17 00:00:00 2001
  2. From: Samuel Cabrero <samuelcabrero@gmail.com>
  3. Date: Wed, 23 Dec 2015 11:45:48 +0100
  4. Subject: [PATCH] Override system locale and set to default when adding gcc
  5. paths
  6. Forces the use of the default locale in the function
  7. add_gcc_paths, which is called when cross compiling to add the
  8. include and library paths. This is necessary because otherwise
  9. the gcc output is localized and the output parsing fails, which
  10. results in no paths added and detect_modules not able to find
  11. any system library (eg. libz, libssl, etc.)
  12. [Thomas: patch taken from https://bugs.python.org/issue23767.]
  13. Signed-off-by: Samuel Cabrero <samuelcabrero@gmail.com>
  14. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  15. [james.hilliard1@gmail.com: adapt to python 3.9]
  16. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
  17. ---
  18. setup.py | 2 +-
  19. 1 file changed, 1 insertion(+), 1 deletion(-)
  20. diff --git a/setup.py b/setup.py
  21. index d3f0e663f2..926c16f58f 100644
  22. --- a/setup.py
  23. +++ b/setup.py
  24. @@ -680,7 +680,7 @@ class PyBuildExt(build_ext):
  25. tmpfile = os.path.join(self.build_temp, 'ccpaths')
  26. if not os.path.exists(self.build_temp):
  27. os.makedirs(self.build_temp)
  28. - ret = run_command('%s -E -v - </dev/null 2>%s 1>/dev/null' % (cc, tmpfile))
  29. + ret = run_command('LC_ALL=C %s -E -v - </dev/null 2>%s 1>/dev/null' % (cc, tmpfile))
  30. is_gcc = False
  31. is_clang = False
  32. in_incdirs = False
  33. --
  34. 2.25.1