From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: Question about updating python to 3.10 Date: Sun, 26 Dec 2021 15:38:19 +0100 Message-ID: In-Reply-To: <43B4BB91-7CA7-46AE-8FFE-E2B1EA207443@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4508314157581776289==" List-Id: --===============4508314157581776289== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, On 17/12/2021 12:41, Michael Tremer wrote: > Hello Adolf, >=20 >> On 17 Dec 2021, at 11:55, Adolf Belka wrote: >> >> Hi All, >> >> >> I am working on updating python from 3.8 to 3.10. Python itself is okay af= ter some other python related programs were also updated due to their older v= ersions not working with 3.10 >=20 > Thank you for working on this. >=20 >> I am working through all the programs that reference python-3.8 in their r= ootfiles, or wherever, to change them to 3.10 >> >> My question comes with regard to the changes to the rootfiles to ensure th= ey will be included properly in an update. >=20 > We will have to ship everything that puts anything into /usr/lib*/python3.*= /site-packages again with the release of Python 3.10. >=20 > This isn=E2=80=99t fun, but not as much of a pain in the rear as shipping a= new Perl release. >=20 >> 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 u= pdated. >=20 > Yes. That is required for Pakfire to find a new version. >=20 >> I don't know what to do for the core programs where I have updated the roo= tfile. The lfs files for these programs don't have a PAK_VER number to increm= ent and the actual package version number is not being changed so I don't kno= w what I need to change in the lfs to ensure that the rootfile changes will b= e properly included in the update? >=20 > I would say committing everything into a =E2=80=9Cpython-3.10=E2=80=9D bran= ch and submitting it all as a patchset is fine. All packages that have been t= ouched in that branch will have to be shipped again which should be easy to i= dentify if it all comes in one large branch. Okay, that is clear then.Will follow that approach. >=20 >> I would appreciate any help on what I need to do for these programs that h= ave had changes only in their rootfiles. >=20 > Absolutely. Did you find anything that didn=E2=80=99t build yet? I have not had any problem with python3.10 itself but I found some of=20 the older modules would not work with 3.10 so I decided to do a combined=20 update to 3.10 plus update modules to latest versions. I found that after python3-setuptools-scm had run that the next module=20 python3-six failed to run due to missing the tomli library. I commented=20 out six and reran the build and then python3-dateutil had the same=20 problem and then python3-jmespath After some investigation I have found that since version 6.0.0 of=20 python3-setuptools-scm, tomli has been a required library when it is=20 being used by other modules. So running version 6.0.0 of setuptools-scm=20 worked with python3.10 and subsequent modules built successfully as=20 tomli not needed. So the obvious fix is to install tomli but that is when I ran into a=20 problem. tomli has no setup.py or setup.cfg files in its tarball. The=20 only way to build it is using pip. Apparently, after some searching, setup.py has been deprecated as the=20 recommended install method and if setup.py doesn't work the usual fix=20 suggestion is to run pip install. Having searched on pip for a while, it looks like builds using it can=20 still be done from tarballs locally without needing to access the=20 internet to download the modules. As pip is installed as part of python3 i tried using that. 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. This failed because tomli requires flit_core to be available. flit_core also has no setup.py and so I tried to build it with pip=20 install. This failed with the error message that tomli was required as a=20 dependency. So I added --no-deps to the flit_core pip install line and=20 this time flit_core successfully built but the tomli build still came=20 back with not finding flit_core. I have tried a variety of changes to the pip install line but none of=20 them has been successful and it has become clear that I am out of my=20 depth here and need guidance rather than just trying anything I find=20 from a google search. I am not even really clear if pip install is the=20 correct approach, except if not then I have no idea how to progress. Help urgently needed on how I should be approaching this. Regards, Adolf. PS: I hope everyone had an enjoyable Christmas. >=20 > -Michael >=20 >> >> Regards, >> >> Adolf. >> >> --=20 >> Sent from my laptop >> >=20 --=20 Sent from my laptop --===============4508314157581776289==--