All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@lists.openembedded.org
Subject: [RFC] set PYTHONPATH inside distutils-base.bbclass instead of distutils.bbclass
Date: Mon, 15 Feb 2010 11:13:51 +0100	[thread overview]
Message-ID: <hlb6ov$s5c$1@ger.gmane.org> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I had a problem with building python-pygobject-native last week which
was due to this bit in m4/python.m4

if test -x "$PYTHON-config"; then
PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
else
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
  PYTHON_INCLUDES="$PYTHON_INCLUDES
- -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
>fi
fi

$PYTHON-config exists in staging and needs HOST_SYS, BUILDSYS,
STAGING_LIBDIR and STAGING_INCDIR exported to work.

But after instrumenting python.m4 a bit I get this when running
python-config:

Traceback (most recent call last):
  File "/OE/angstrom-dev/staging/x86_64-linux/usr/bin/python-config",
line 26, in <module>
    pyver = sysconfig.get_config_var('VERSION')
  File "/usr/lib/python2.5/distutils/sysconfig.py", line 541, in
get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.5/distutils/sysconfig.py", line 499, in
get_config_vars
    func()
  File "/usr/lib/python2.5/distutils/sysconfig.py", line 351, in _init_posix
    filename = get_makefile_filename()
  File "/usr/lib/python2.5/distutils/sysconfig.py", line 210, in
get_makefile_filename
    return os.path.join(lib_dir, "config" + (sys.pydebug and "_d" or
""), "Makefile")AttributeError: 'module' object has no attribute 'pydebug'

Which means it's using the distutils on my buildhost instead of the
proper one in staging.

OE is doing this:

export
PYTHONPATH=/OE/bitbake:/OE/bitbake/lib:/OE/bitbake-git/bin:/usr/lib/python2.5:/usr/lib/python2.5/plat-linux2:/usr/lib/python2.5/lib-tk:/usr/lib/python2.5/lib-dynload:/usr/local/lib/python2.5/site-packages:/usr/lib/python2.5/site-packages:/usr/lib/python2.5/site-packages/Numeric:/usr/lib/python2.5/site-packages/PIL:/usr/lib/pymodules/python2.5:/usr/lib/pymodules/python2.5/gtk-2.0

So I added this to the recipe:

do_configure_prepend() {
       unset PYTHONPATH
}

And everything started working again.

So my question is:

Can we set PYTHONPATH inside distutils-base.bbclass instead of
distutils.bbclass or just plain unset it?

regards,

Koen



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLeR5fMkyGM64RGpERApuWAJ4zzAKv7lVLPc9JIVJaBvul/ZGN2ACgmBH7
zA6ShA0i6mutv5+rCEncno8=
=48js
-----END PGP SIGNATURE-----




             reply	other threads:[~2010-02-15 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15 10:13 Koen Kooi [this message]
2010-02-15 13:50 ` [RFC] set PYTHONPATH inside distutils-base.bbclass instead of distutils.bbclass Koen Kooi
2010-02-15 14:06   ` Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hlb6ov$s5c$1@ger.gmane.org' \
    --to=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.