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: Re: [RFC] set PYTHONPATH inside distutils-base.bbclass instead of distutils.bbclass
Date: Mon, 15 Feb 2010 14:50:12 +0100	[thread overview]
Message-ID: <hlbjej$5i7$1@ger.gmane.org> (raw)
In-Reply-To: <hlb6ov$s5c$1@ger.gmane.org>

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

After some discussion with Richard I committed this:

http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=fd4a161b6095f5b6f83d50d4d979000399944260

That seems to solve the sympoms I'm seeing, but the underlying problem
is still present.


On 15-02-10 11:13, Koen Kooi wrote:
> 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)

iD8DBQFLeVEUMkyGM64RGpERAkhlAJ9OiETWdhQeDNIjCmlxDiF2nwW4UQCfWLL6
02mZF8nFVpFFDJe7xvxHyHY=
=rfuo
-----END PGP SIGNATURE-----




  reply	other threads:[~2010-02-15 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15 10:13 [RFC] set PYTHONPATH inside distutils-base.bbclass instead of distutils.bbclass Koen Kooi
2010-02-15 13:50 ` Koen Kooi [this message]
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='hlbjej$5i7$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.