Annotation of pkgsrc/lang/python27/patches/patch-Lib_distutils_command_build__ext.py, revision 1.1
1.1 ! adam 1: $NetBSD: patch-ab,v 1.4 2015/04/24 03:01:36 rodent Exp $
! 2:
! 3: --- Lib/distutils/command/build_ext.py.orig 2014-12-10 15:59:34.000000000 +0000
! 4: +++ Lib/distutils/command/build_ext.py
! 5: @@ -511,8 +511,19 @@ class build_ext (Command):
! 6: # that go into the mix.
! 7: if ext.extra_objects:
! 8: objects.extend(ext.extra_objects)
! 9: +
! 10: + # Two possible sources for extra linker arguments:
! 11: + # - 'extra_link_args' in Extension object
! 12: + # - LDFLAGS environment variable
! 13: + # The environment variable should take precedence, and
! 14: + # any sensible compiler will give precedence to later
! 15: + # command line args. Hence we combine them in order:
! 16: extra_args = ext.extra_link_args or []
! 17:
! 18: + if os.environ.has_key('LDFLAGS'):
! 19: + extra_args = list(extra_args)
! 20: + extra_args.extend(string.split(os.environ['LDFLAGS']))
! 21: +
! 22: # Detect target language, if not provided
! 23: language = ext.language or self.compiler.detect_language(sources)
! 24:
CVSweb <webmaster@jp.NetBSD.org>