Bug 477 - Python modules not built/installed correctly
Summary: Python modules not built/installed correctly
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.0 PointRelease
Assignee: Nitin Kamble
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-10-16 04:19 UTC by Gary Thomas
Modified: 2011-05-13 10:51 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Thomas 2010-10-16 04:19:51 UTC
ref commit 5783e717ee9f503d8e03992306a6b9ddfda6f73e

Build python-pycairo.  The file
  /usr/lib/python2.6/site-packages/cairo/__init__.py
does not get installed.  This makes the package useless (Python can't load it)
Comment 1 Gary Thomas 2010-10-16 07:10:03 UTC
This fails because the paths used by setup.py are wrong.  This install call
  
dic.setup(
  name = "pycairo",
  version = pycairo_version,
  description = "python interface for cairo",
  ext_modules = [cairo],
  data_files = [
    ('include/pycairo', ['src/pycairo.h']),
    ('lib/pkgconfig', [pkgconfig_file]),
    (os.path.join(dsy.get_python_lib(), 'cairo'), 
     ['src/__init__.py']),
    ],
  )

ends up sending __init__.py into the sysroots tree, not the package image
where it would eventually get packaged up.  To be clear, this expression
  os.path.join(dsy.get_python_lib(), 'cairo')
expands to something like
  /home/local/emenlow_test/tmp/sysroots/i586-poky-linux/usr/lib/python2.6/site-packages/cairo
when it should be
  /home/local/emenlow_test/tmp/work/emen-poky-linux/python-pycairo-1.8.10-ml0/image/usr/lib/python2.6/site-packages/cairo
Comment 2 Nitin Kamble 2011-04-15 19:10:34 UTC
pushed a fix for this in the nitin/bugfixes branch on poky-contrib repository
Comment 3 Nitin Kamble 2011-04-25 17:28:42 UTC
This commit has gone in master for this bug:


commit 4ffd8a2d7224803eba152c9dbc0f7e0f837931bc
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Fri Apr 15 18:54:04 2011 -0700

    python-pycairo: fix installation path of __init__.py
    
    This fixes Bug [YOCTO #477]
    
    (From OE-Core rev: 8f6436b25a96594d09c64c7ba20a045cb1f8d18a)
    
    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>