You are not logged in.

#1 2022-05-04 01:30:34

GanGrey
Member
Registered: 2022-05-04
Posts: 2

Current Python 2 to Python 3 conversion state in Arch packages

Hi, I've been looking at the Python 2 removal process from official repositories and here's my little status update to these Todo Lists:
https://archlinux.org/todo/conversion-o … -python-3/
https://archlinux.org/todo/remove-pytho … m-package/


'mailman' - won't be ported to Py3, 'mailman3' is the alternative.
'geda-gaf' - Py3 is very low priority for dev and the whole project homepage seems to be unreachable for most times.
'ghidra' - depends on Jython which is not compatible with Py3. Jython 3 is in the works, but it could take awhile as it seems (see https://github.com/NationalSecurityAgen … /issues/23 ).
'amdvlk' - Py3 is already supported, just a new package build is needed.
'dia' - claims to be Py3 compatible (see https://gitlab.gnome.org/GNOME/dia/-/issues/408 ), although it would require new release which seems to be taking awhile.
'electron11', 'electron12', 'electron13' - depend on nodejs v14.16, and Py3 build compatibility was added in v14.17 (electron14 and up) (see https://github.com/nodejs/node/pull/37835 ). Packages built upon these: 'atom', 'react-native-debugger', 'cozy-desktop', 'caprine', 'keybase-gui', 'wire-desktop'.
'netpbm' - Py3 compatibility could be achieved (see https://sourceforge.net/p/netpbm/code/2996/ and https://sourceforge.net/p/netpbm/code/3033/ ) if the package source would switch from "super stable" to "advanced" branch like other distros did.
'skia-sharp' - Py3 support was added, only needs new release (see https://github.com/mono/SkiaSharp/pull/1959 ).
'playonlinux' - Py3 support was added in v4.4 (see https://github.com/PlayOnLinux/POL-POM- … ANGELOG.md ).
'renpy' - Py3 compatible version is in the works (see https://github.com/renpy/renpy/issues/2003 ) and may be released soon-ish.
'displaycal' - new package build of fork supporting Py3 is in testing. Project name may change in the future? (see https://github.com/eoyilmaz/displaycal-py3/issues/96 ).
'seamonkey' - needs new Mozilla build files, ETA unknown (see https://bugzilla.mozilla.org/show_bug.cgi?id=1756371 ).

Most probably dead projects?:
'percol' - v0.2.1 was released on Jul 30, 2015, last commit to the repo on Jul 23, 2019. No full Py3 porting (see https://github.com/mooz/percol/issues/107 ).
'swift' - Py3 support was added (see https://swift.im/git/swift/commit/?id=9 … 824df51c81 ), however no new version beyond v4.0.3 was ever released. Last commit to the repo on Jan 9, 2020.


If I didn't omit anything, these packages should be the last ones using Python 2, so the time to finally part with it is near.

Offline

#2 2022-05-24 20:30:37

loqs
Member
Registered: 2014-03-06
Posts: 14,862

Re: Current Python 2 to Python 3 conversion state in Arch packages

GanGrey wrote:

'dia' - claims to be Py3 compatible (see https://gitlab.gnome.org/GNOME/dia/-/issues/408 ), although it would require new release which seems to be taking awhile.

dia as packaged can be built without python2.  Sadly it currently fails to build as it uses freetype-config
Based on https://gitlab.gnome.org/GNOME/dia/-/co … 7c546310a3

diff --git a/configure.in b/configure.in
index c5edeed..649a189 100644
--- a/configure.in
+++ b/configure.in
@@ -62,43 +62,26 @@ PKG_CHECK_MODULES(PANGOVERSION, pango >= 1.8.0, ,
 
 AC_ARG_WITH(freetype,
 [  --without-freetype        compile without FreeType support],,with_freetype=yes)
-if test "x$with_freetype" = "xyes"; then
-PKG_CHECK_MODULES(PANGOFT2,pangoft2,have_pangoft2=true,have_pangoft2=false)
-if test "$have_pangoft2" = "true"; then
-  dnl On Solaris with Forte C, at least, need to link app/dia with -lfreetype.
-  dnl It's not enough that -lpangoft2 implicitly pulls it in.
-  have_freetype=false
-  AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=true,have_freetype=false,`freetype-config --libs`)
-  if test "$have_freetype" = "true"; then
-    dnl Need 2.0.9, as a bug was fixed for us there.
-    dnl However, freetype-config doesn't give a meaningful version, so we must
-    dnl do it like this.
-    AC_MSG_CHECKING([if FreeType version is 2.0.9 or higher])
-    old_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS `freetype-config --cflags`"
-    AC_TRY_CPP([#include <ft2build.h>
-#include FT_FREETYPE_H
-#if (FREETYPE_MAJOR*1000+FREETYPE_MINOR)*1000+FREETYPE_PATCH < 2000009
-#error Freetype version too low.
-#endif
-],
-        [AC_MSG_RESULT(yes)
-	 FREETYPE_LIBS=`freetype-config --libs`
-	 AC_SUBST(FREETYPE_LIBS)
-	 FREETYPE_CFLAGS=`freetype-config --cflags`
-	 AC_SUBST(FREETYPE_CFLAGS)
-	 GTK_MODULES="$GTK_MODULES pangoft2"
-	 AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])]
-    ,
-	[AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
-    CPPFLAGS="$old_CPPFLAGS"
-  else
-    AC_MSG_ERROR(Can't find FreeType library)
-  fi
-else
-  AC_MSG_ERROR(Can't find PangoFT2 library)
-fi
-fi
+AS_IF([test "x$with_freetype" = "xyes"],[
+    dnl freetype2.pc uses the libtool specific version number and not the
+    dnl package version. See
+    dnl https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT
+    dnl Let's raise minimum dependency to freetype-2.4.0 because that's the
+    dnl lowest freetype libtool version I could find.
+    dnl freetype-2.4.0 is from July 2010 and should be reasonably old
+    dnl enough.
+    PKG_CHECK_MODULES(FREETYPE, freetype2 >= 11.0.5,
+        [
+            CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
+            AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
+        ],
+        AC_MSG_ERROR([Need FreeType library version 2.4.0 or higher])
+    )
+    PKG_CHECK_MODULES(PANGOFT2,pangoft2,
+        GTK_MODULES="$GTK_MODULES pangoft2",
+        AC_MSG_ERROR(Can't find PangoFT2 library)
+    )
+])
 AM_CONDITIONAL(WITH_FREETYPE, test "x$with_freetype" != "xno")
 
 CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
GanGrey wrote:

'electron11', 'electron12', 'electron13' - depend on nodejs v14.16, and Py3 build compatibility was added in v14.17 (electron14 and up)

These can all be built with pypy .

GanGrey wrote:

'netpbm' - Py3 compatibility could be achieved (see https://sourceforge.net/p/netpbm/code/2996/ and https://sourceforge.net/p/netpbm/code/3033/ ) if the package source would switch from "super stable" to "advanced" branch like other distros did.

https://bugs.archlinux.org/task/70198

GanGrey wrote:

'skia-sharp' - Py3 support was added, only needs new release (see https://github.com/mono/SkiaSharp/pull/1959 ).

Could you get 2.88.0 to build?   I encountered a missing include possibly due to the use of the STL from gcc.
Includes from https://skia.googlesource.com/skia/+/cd … 96a6f4fa36 possibly not needed
https://skia.googlesource.com/skia/+/cd … 96a6f4fa36
https://skia.googlesource.com/skia/+/62 … 82fb18703b again possibly not needed

diff --git a/src/utils/SkParseColor.cpp b/src/utils/SkParseColor.cpp
index 7260365b2c..503ed08ff6 100644
--- a/src/utils/SkParseColor.cpp
+++ b/src/utils/SkParseColor.cpp
@@ -8,6 +8,10 @@
 
 #include "include/utils/SkParse.h"
 
+#include <string.h>
+#include <algorithm>
+#include <iterator>
+
 static constexpr const char* gColorNames[] = {
     "aliceblue",
     "antiquewhite",
GanGrey wrote:

'swift' - Py3 support was added (see https://swift.im/git/swift/commit/?id=9 … 824df51c81 ), however no new version beyond v4.0.3 was ever released. Last commit to the repo on Jan 9, 2020.

https://bugs.archlinux.org/task/71283

Last edited by loqs (2022-05-24 20:46:21)

Offline

#3 2022-05-31 22:46:13

GanGrey
Member
Registered: 2022-05-04
Posts: 2

Re: Current Python 2 to Python 3 conversion state in Arch packages

GanGrey wrote:

'netpbm' - Py3 compatibility could be achieved (see https://sourceforge.net/p/netpbm/code/2996/ and https://sourceforge.net/p/netpbm/code/3033/ ) if the package source would switch from "super stable" to "advanced" branch like other distros did.

Yeah, that will allow to build netpbm with Py3. However, I'm still in favor of switching to the 'advanced' branch, like Debian, Fedora and Slackware.

GanGrey wrote:

'skia-sharp' - Py3 support was added, only needs new release (see https://github.com/mono/SkiaSharp/pull/1959 ).

loqs wrote:

Could you get 2.88.0 to build?   I encountered a missing include possibly due to the use of the STL from gcc.

Also no luck there, getting the same error. But it should be Py3 compatible now.


And now some updates to the original post:
- 'geda-gaf', 'percol' and 'playonlinux' were relegated to AUR
- 'amdvlk' and 'displaycal' are Py3 compatible now


If anyone needs 'geda-gaf' and 'pcb' there is another solution: replacing it by lepton-eda and pcb-rnd. Here's why:
1. lepton-eda ( https://github.com/lepton-eda/lepton-eda ):
- backward compatible with its predecessor geda-gaf (forked in 2016)
- actively developed, frequent releases
- no dependency on Python
- GTK3 supported
- no Guile 2.0x, only Guile 2.2x is needed.
2. pcn-rnd ( http://www.repo.hu/projects/pcb-rnd/index.html ):
- compatible with KiCad and gEDA/PCB, understands Eagle and Protel/Autotrax file formats
- in active development, frequent releases
- GTK4 supported
- 'fungw' is optional package and you don't need to install it with Py2 support
- ringdove-eda suite is in the works, combining schematics editor, PCB editor and CAM viewer.

Offline

Board footer

Powered by FluxBB