From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer <michael.tremer@ipfire.org> To: development@lists.ipfire.org Subject: Re: Dropping Python 2 (problems with libxml2 and libxslt) Date: Tue, 11 May 2021 14:25:31 +0100 Message-ID: <7A982478-7F32-48D4-99B2-27A5CA9828EE@ipfire.org> In-Reply-To: <fbd08eb8-2672-8fb1-79f1-5dfd8e300bae@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5171159964447583987==" List-Id: <development.lists.ipfire.org> --===============5171159964447583987== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, Did you try =E2=80=94-disable-python? I am not aware that we need the Python modules. -Michael > On 11 May 2021, at 14:24, Adolf Belka <adolf.belka(a)ipfire.org> wrote: >=20 > Hi All, >=20 > Problems trying to update libxml2 and libxslt from python2 to python3. >=20 > Using --with-python=3Dpython3 in the configure section gives the result of = unknown command and it builds with python2. >=20 > Using PYTHON=3Dpython3 before the ./configure command is ignored by the con= figure process and it builds with python2. >=20 > There is a python3 version of libxml2 available in PyPI but it was released= in 2018 and nothing since then. >=20 > It looks like both libxml2 and libxslt only do their python bits in python2= . Not running python at all would still give the libxml2 and libxslt librarie= s but would miss out the uncommented python lines in the rootfile:- >=20 > usr/lib/python2.7/site-packages/drv_libxml2.py > usr/lib/python2.7/site-packages/libxml2.py > #usr/lib/python2.7/site-packages/libxml2mod.la > usr/lib/python2.7/site-packages/libxml2mod.so >=20 >=20 > usr/lib/python2.7/site-packages/libxml2.pyc > #usr/lib/python2.7/site-packages/libxslt.py > #usr/lib/python2.7/site-packages/libxsltmod.a > #usr/lib/python2.7/site-packages/libxsltmod.la > usr/lib/python2.7/site-packages/libxsltmod.so >=20 >=20 > I can't tell if missing those would be a problem. >=20 > I also can't tell if there is any alternative way around libxml2/libxslt wi= th python3 or not and if this means that python 2 needs to stay for these two= libraries. >=20 >=20 > Regards, >=20 > Adolf. >=20 > On 05/05/2021 16:27, Michael Tremer wrote: >> Hello, >>=20 >> I would like to talk about what has been discussed at the last developer c= onference call this week: Dropping Python 2 >>=20 >> This version of Python has reached its end of life and will no longer rece= ive any security fixes. Hence we need to get rid of it as soon as possible. >>=20 >> However, there is lots of software that still depends on it which has to b= e migrated away first. >>=20 >> There are at least the following packages: >>=20 >> boost >> fetchmail >> fireinfo >> iotop >> ipaddr >> libxml2 >> libxslt >> newt >> nmap >> python >> python-clientform >> python-daemon >> python-distutils >> python-distutils-extra >> python-docutils >> python-feedparser >> python-inotify >> python-ipaddress >> python-m2crypto >> python-mechanize >> python-optional-src >> python-pyparsing >> python-rssdler >> python-setuptools >> python-six >> python-typing >>=20 >> We also have the following scripts: >>=20 >> config/ca-certificates/certdata2pem.py >> config/unbound/unbound-dhcp-leases-bridge >>=20 >> Fireinfo is written by us and has a lot of C which will make it a little b= it more difficult to migrate. We would also have to be very careful to not ch= ange any behaviour of the current implementation. >>=20 >> The rest is probably either software that is entirely written in Python 2 = or software that brings bindings for Python. The latter case is easy because = we can either force it to build with Python 3 or we just disable the bindings. >>=20 >> Ultimately we might need to keep Python around in the build system if ther= e are other packages that rely on it. However, it would be great if we were a= ble to remove it from the distribution very soon. Looking at his list, it doe= s not seem to be too difficult. >>=20 >> Would anyone be up to help and remove Python from any of those packages ab= ove? I would like to aim for Core Update 158 and remove as much stuff as poss= ible - if we can everything - and then remove Python 2 in the update after th= at. If anyone has any custom scripts or applications, people will have some t= ime to migrate away. >>=20 >> Best, >> -Michael --===============5171159964447583987==--