python3-3.3-004-no-import-when-cross-compiling.patch 1.0 KB

123456789101112131415161718192021222324252627
  1. Disable import check when cross-compiling
  2. Once Python has compiled an extension (i.e some C code, potentially
  3. linked to a library), it tries to import it. This cannot work in
  4. cross-compilation mode, so we just disable this check.
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  7. ---
  8. setup.py | 4 ++++
  9. 1 file changed, 4 insertions(+)
  10. Index: Python-3.3.0/setup.py
  11. ===================================================================
  12. --- Python-3.3.0.orig/setup.py
  13. +++ Python-3.3.0/setup.py
  14. @@ -318,6 +318,10 @@
  15. self.announce('WARNING: skipping import check for Cygwin-based "%s"'
  16. % ext.name)
  17. return
  18. + if os.environ.get('CROSS_COMPILING') == 'yes':
  19. + self.announce('WARNING: skipping import check for cross compiled "%s"'
  20. + % ext.name)
  21. + return
  22. ext_filename = os.path.join(
  23. self.build_lib,
  24. self.get_ext_filename(self.get_ext_fullname(ext.name)))