<?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>14737</bug_id>
          
          <creation_ts>2022-02-22 23:03:39 +0000</creation_ts>
          <short_desc>recipetool/devtool: add support for Python PEP-517 (pyproject.toml and setup.cfg) packages</short_desc>
          <delta_ts>2025-02-14 16:48:19 +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>devtools / tool chain</component>
          <version>4.0</version>
          <rep_platform>x86</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>normal</bug_severity>
          <target_milestone>5.0 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>jstephan</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>tvgamblin</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92632</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-02-22 23:03:39 +0000</bug_when>
    <thetext>The current recipetool code only understands &apos;distutils&apos; and legacy &apos;setuptools&apos; (setup.py) invocations. We need to check for presence of pyproject.toml and then _if_ it supports proper PEP-517 backend, make a stab at DEPENDS and RDEPENDS.

While we are at it, we should probably remove &apos;distutils&apos; support completely?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92658</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-02-24 15:44:26 +0000</bug_when>
    <thetext>Backport to 3.5 if not too invasive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92665</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-02-24 16:38:09 +0000</bug_when>
    <thetext>The first thing that must be changed is the logic at:
https://git.yoctoproject.org/poky/tree/scripts/lib/recipetool/create_buildsys_python.py#n158

        # Check for non-zero size setup.py files
        setupfiles = RecipeHandler.checkfiles(srctree, [&apos;setup.py&apos;])
        for fn in setupfiles:
            if os.path.getsize(fn):
                break
        else:
            return False

This also needs to look for pyproject.toml and setup.cfg files. Based on what files are found, make a decision of how to proceed.

For instance, if a pyproject.toml is present, has a [build-system] section and a build-backend that we know about (have a bbclass for) then the recipe should inherit e.g. flit_core, setuptools_build_meta or poetry_core (WIP).

Looking for dependencies will also need more than one way to handle it, as recipes without setup.py might include such info in setup.cfg or in pyproject.toml.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97304</commentid>
    <comment_count>3</comment_count>
    <who name="Julien Stephan">jstephan</who>
    <bug_when>2023-11-22 15:28:00 +0000</bug_when>
    <thetext>merged on https://git.yoctoproject.org/poky/commit/?id=d4debbf5b7ff9e0f489530aa748c559d631eeb57 so closing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97306</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2023-11-22 16:45:10 +0000</bug_when>
    <thetext>ACCEPTED means you have accepted the bug and are working on it. The way to mark a bug as closed is RESOLVED FIXED.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97309</commentid>
    <comment_count>5</comment_count>
    <who name="Julien Stephan">jstephan</who>
    <bug_when>2023-11-23 08:06:49 +0000</bug_when>
    <thetext>(In reply to Tim Orling from comment #4)
&gt; ACCEPTED means you have accepted the bug and are working on it. The way to
&gt; mark a bug as closed is RESOLVED FIXED.

got it thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100974</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-14 16:46:24 +0000</bug_when>
    <thetext>bulk change to add Saul&apos;s non-WR address.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101056</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-14 16:48:19 +0000</bug_when>
    <thetext>Bulk change: Remove Saul&apos;s old WR address.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>