<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4451</bug_id>
          
          <creation_ts>2013-05-03 23:55:40 +0000</creation_ts>
          <short_desc>Feature request: automatic rdepends based on python dependencies</short_desc>
          <delta_ts>2015-01-09 23:30:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christopher Larson">kergoth</reporter>
          <assigned_to name="Christopher Larson">kergoth</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>TicoTimo</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32883</commentid>
    <comment_count>0</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2013-05-03 23:55:40 +0000</bug_when>
    <thetext>It would be nice if the packaging code was able to analyze included python code to determine the python modules it depends upon, the way we do for kernel modules and for shared library linking.

We could likely implement this using the existing &apos;modulefinder&apos; package that&apos;s in the python standard library, see http://docs.python.org/2/library/modulefinder for details on that. It could also potentially read the shebang lines for core python version, and potentially look at python packaging information (setuptools, egg-info, etc).

Related: rpm feature request to do this at http://www.rpm.org/ticket/154, and attached egg-info analyzer script at http://aurelien.bompard.org/projects/files/misc/pythondeps.sh

The counter-argument for this would be that it&apos;s too much magic, and is too implicit, violating the Zen of Python, but if there&apos;s a sufficient improvement in usability, and I think there is, it may be worthwhile. As Paul Eggleton pointed out on IRC, you can end up in a sad build/test cycle adding various rdepends for various modules until you&apos;re able to run the thing you&apos;re writing a recipe for, which could be quite frustrating for the user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33761</commentid>
    <comment_count>1</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2013-06-11 17:25:59 +0000</bug_when>
    <thetext>Starting work on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33872</commentid>
    <comment_count>2</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2013-06-12 18:57:18 +0000</bug_when>
    <thetext>As I started implementing the metadata aspects of this, duplicating the pattern implemented by both shlibs and the pkgconfig dependency code, I started wondering if we shouldn&apos;t have a more general mechanism that one can hook into to add new types of automatic dependencies. My current thoughts on that: https://gist.github.com/kergoth/5768039. Any opinions on that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40002</commentid>
    <comment_count>3</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2014-01-23 00:04:37 +0000</bug_when>
    <thetext>https://github.com/kergoth/meta-package-auto-deps has the last work I did on this about 4 months ago. I&apos;m going to look into finishing this work (potentially reworking what I was playing with before), and see about submitting for comments and review, hopefully in the next week or two.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46600</commentid>
    <comment_count>4</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2014-10-27 18:11:55 +0000</bug_when>
    <thetext>I think this will be a useful feature, but we need to determine the form it should take. I think it should be an explicit opt-in choice, not an automatic one, given the amount of manual massaging of the output needed. Shifting to a future milestone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47850</commentid>
    <comment_count>5</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2015-01-09 23:30:40 +0000</bug_when>
    <thetext>Implemented by bug 7036 as a part of the recipe creation process rather than packaging process, to avoid the concerns with that which I brought up in this issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>