From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: Question about updating python to 3.10 Date: Sun, 26 Dec 2021 21:55:55 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0029466772217341425==" List-Id: --===============0029466772217341425== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Merry Christmas, > On 26 Dec 2021, at 15:38, Adolf Belka wrote: >=20 > Hi Michael, >=20 > On 17/12/2021 12:41, Michael Tremer wrote: >> Hello Adolf, >>> On 17 Dec 2021, at 11:55, Adolf Belka wrote: >>>=20 >>> Hi All, >>>=20 >>>=20 >>> I am working on updating python from 3.8 to 3.10. Python itself is okay a= fter some other python related programs were also updated due to their older = versions not working with 3.10 >> Thank you for working on this. >>> I am working through all the programs that reference python-3.8 in their = rootfiles, or wherever, to change them to 3.10 >>>=20 >>> My question comes with regard to the changes to the rootfiles to ensure t= hey will be included properly in an update. >> We will have to ship everything that puts anything into /usr/lib*/python3.= */site-packages again with the release of Python 3.10. >> This isn=E2=80=99t fun, but not as much of a pain in the rear as shipping = a new Perl release. >>> For the addons then when I change the rootfile I am also incrementing the= PAK_VER number in the lfs files and that ensures that they will be properly = updated. >> Yes. That is required for Pakfire to find a new version. >>> I don't know what to do for the core programs where I have updated the ro= otfile. The lfs files for these programs don't have a PAK_VER number to incre= ment and the actual package version number is not being changed so I don't kn= ow what I need to change in the lfs to ensure that the rootfile changes will = be properly included in the update? >> I would say committing everything into a =E2=80=9Cpython-3.10=E2=80=9D bra= nch and submitting it all as a patchset is fine. All packages that have been = touched in that branch will have to be shipped again which should be easy to = identify if it all comes in one large branch. > Okay, that is clear then.Will follow that approach. >>> I would appreciate any help on what I need to do for these programs that = have had changes only in their rootfiles. >> Absolutely. Did you find anything that didn=E2=80=99t build yet? >=20 > I have not had any problem with python3.10 itself but I found some of the o= lder modules would not work with 3.10 so I decided to do a combined update to= 3.10 plus update modules to latest versions. >=20 > I found that after python3-setuptools-scm had run that the next module pyth= on3-six failed to run due to missing the tomli library. I commented out six a= nd reran the build and then python3-dateutil had the same problem and then p= ython3-jmespath I completely lost track of what the status of setuptools/distutils and so on = is. This has changed multiple times and become independent/part of the distri= bution again and so on. > After some investigation I have found that since version 6.0.0 of python3-s= etuptools-scm, tomli has been a required library when it is being used by oth= er modules. So running version 6.0.0 of setuptools-scm worked with python3.10= and subsequent modules built successfully as tomli not needed. >=20 > So the obvious fix is to install tomli but that is when I ran into a proble= m. tomli has no setup.py or setup.cfg files in its tarball. The only way to b= uild it is using pip. Err. Great. > Apparently, after some searching, setup.py has been deprecated as the recom= mended install method and if setup.py doesn't work the usual fix suggestion i= s to run pip install. Yes. But apparently the new system is deprecated, too. I really dislike the s= tate of packaging systems that come with any language these days. > Having searched on pip for a while, it looks like builds using it can still= be done from tarballs locally without needing to access the internet to down= load the modules. That is good! > As pip is installed as part of python3 i tried using that. >=20 > I used "python3 -m pip install --root=3D/ ." in place of > "python3 setup.py build > python3 setup.py install --root=3D/" > for the tomli source. >=20 > This failed because tomli requires flit_core to be available. >=20 > flit_core also has no setup.py and so I tried to build it with pip install.= This failed with the error message that tomli was required as a dependency. = So I added --no-deps to the flit_core pip install line and this time flit_cor= e successfully built but the tomli build still came back with not finding fli= t_core. >=20 > I have tried a variety of changes to the pip install line but none of them = has been successful and it has become clear that I am out of my depth here an= d need guidance rather than just trying anything I find from a google search.= I am not even really clear if pip install is the correct approach, except if= not then I have no idea how to progress. >=20 > Help urgently needed on how I should be approaching this. Circular dependencies can happen. This won=E2=80=99t be the first time and it= always is an utter nightmare with our buildsystem. This page states that pip comes by default with all binary packages: https://docs.python.org/3/installing/index.html Is there a chance that it is part of the distribution and can be enabled with= a configure switch? -Michael >=20 > Regards, > Adolf. >=20 > PS: I hope everyone had an enjoyable Christmas. I hope you did, too! >=20 >=20 >> -Michael >>>=20 >>> Regards, >>>=20 >>> Adolf. >>>=20 >>> --=20 >>> Sent from my laptop >>>=20 >=20 > --=20 > Sent from my laptop --===============0029466772217341425==--