<?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>14610</bug_id>
          
          <creation_ts>2021-10-22 12:37:59 +0000</creation_ts>
          <short_desc>Stop using python distutils</short_desc>
          <delta_ts>2022-01-18 20:49:38 +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>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>4.0 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>TicoTimo</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>91820</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2021-10-22 12:37:59 +0000</bug_when>
    <thetext>distutils is marked deprecated in py 3.10 and will be removed in py 3.12, therefore its time to start reming distutils use in oe-core and bitbake see 

https://www.python.org/dev/peps/pep-0632/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91839</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-10-28 14:38:53 +0000</bug_when>
    <thetext>Start by moving the distutils class from oe-core to meta-python?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91840</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-10-28 14:56:47 +0000</bug_when>
    <thetext>(1) Expand setuptools3 class to do the bits that it inherits from distutils classes as a start.
(2) Build oe-core python modules without distutils and see if there are any problems.
(3) Build meta-python and see the same.
(4) As a stop gap, move distutils classes to meta-python.

Eventually, we will most likely have to figure out a way of using wheels. Some packaging is not even using setuptools anymore and that trend is likely to increase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91852</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-10-28 17:11:05 +0000</bug_when>
    <thetext>waf.bbclass and sanity.bbclass both import distutils, so it is not only the python3 module building infrastructure (distutils*.bbclass) that needs to change. Other upstream things like glib-2.0, gpgme and bind also import or use methods from distutils.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91853</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-10-28 17:16:26 +0000</bug_when>
    <thetext>Porting from Distutils:
https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html

PEP 632 -- Deprecate distutils module:
https://www.python.org/dev/peps/pep-0632/

Packaging and distributing projects:
https://packaging.python.org/guides/distributing-packages-using-setuptools/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91854</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-10-28 17:30:17 +0000</bug_when>
    <thetext>Things in scripts/ also need to change: wic, buildhistory-diff, recipetool</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92076</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-11-26 04:40:19 +0000</bug_when>
    <thetext>RFC series sent to oe-core list:

https://lore.kernel.org/openembedded-core/cover.1637900380.git.timothy.t.orling@intel.com/T/#t</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92077</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-11-26 05:20:23 +0000</bug_when>
    <thetext>Import distutils.version to lib/bb/version

https://lore.kernel.org/bitbake-devel/20211126051800.2364615-1-timothy.t.orling@intel.com/T/#u

This is a standalone with implementations of LooseVersion and StrictVersion which are not replicated elsewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92316</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-01-13 15:57:40 +0000</bug_when>
    <thetext>Series updated:
https://git.yoctoproject.org/poky-contrib/log/?h=timo/deprecate_distutils_14610_v2

And merged:
 (beginning with) https://git.yoctoproject.org/poky/commit/?id=5e36659ee314fdde2a357fa40a2109a9ebc7530d

Docs changes are in review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92352</commentid>
    <comment_count>9</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-01-18 20:49:38 +0000</bug_when>
    <thetext>Docs changes are merged as are the fixes to meta-openembedded (and meta-python2). It takes a village :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>