]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-native: distutils: don't use libdir, remove dead code path
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 12 Mar 2012 21:24:11 +0000 (22:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Mar 2012 11:44:47 +0000 (11:44 +0000)
* Coming from OE-classic it was surprising that python-native now
  requires 'libdir' to be exported. Otherwise autoconf would fail
  to detect python libraries. This happend using a customized
  environment setup script to use OE's compiler and libs without
  bitbake.
* Use STAGING_LIBDIR instead of libdir.
* While at it, remove redundant 'and' statments.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch

index b46caf64fed3579dd6e39a903611f1de1c983802..f89aaff7b18e86f7a016abeeade5bc726e2a6fe8 100644 (file)
@@ -30,13 +30,13 @@ Upstream-Status: Inappropriate [embedded specific]
      If 'prefix' is supplied, use it instead of sys.prefix or
      sys.exec_prefix -- i.e., ignore 'plat_specific'.
      """
-+    lib_basename = os.getenv("libdir").split('/')[-1]
++    lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
      if prefix is None:
 -        prefix = plat_specific and EXEC_PREFIX or PREFIX
 +        if plat_specific:
-+            prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
++            prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
 +        else:
-+            prefix = plat_specific and EXEC_PREFIX or PREFIX
++            prefix = PREFIX
  
      if os.name == "posix":
          libpython = os.path.join(prefix,