[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#938837: xapp: Python2 removal in sid/bullseye



Dear maintainers,

On Fri, Aug 30, 2019 at 07:58:53AM +0000, Matthias Klose wrote:
> Python2 becomes end-of-live upstream, and Debian aims to remove
> Python2 from the distribution, as discussed in
> https://lists.debian.org/debian-python/2019/07/msg00080.html
> 
> Your package either build-depends, depends on Python2, or uses Python2
> in the autopkg tests.  Please stop using Python2, and fix this issue
> by one of the following actions.
> 
> - Convert your Package to Python3. This is the preferred option.  In
>   case you are providing a Python module foo, please consider dropping
>   the python-foo package, and only build a python3-foo package.  Please
>   don't drop Python2 modules, which still have reverse dependencies,
>   just document them.
>   
>   This is the preferred option.


Please find attached a patch that gets rid of the Py2 dependency.  Note that:

1. Both py2 and py3 GI bindings were shipped in the same binary package;
   as the only users of gir1.2-xapp-1.0 are Py3, I simply removed the Py2 part.

> $ apt-cache rdepends gir1.2-xapp-1.0                  
> Reverse Depends:
>   libxapp-dev
>   libxapp-dev
>   cinnamon
>   cinnamon-screensaver
> 
> $ for i in cinnamon cinnamon-screensaver;
>   { echo "$i"; apt-cache depends "$i" | grep -E 'python3?$' }
> cinnamon
>   Depends: python3
> cinnamon-screensaver
>     python3


2. The package still Build-Depends on python, through python-gi-dev:
   while python-gi-dev doesn't contain anything specific to a Python version,
   it Depends on both python-gi and python3-gi.

   This is probably worth opening a bug against python-gi-dev to figure out
   what would be the correct way forward here.


Best,

  nicoo
From 4bb974c3cecafef5f22f98dbe9da6a7720b15f7f Mon Sep 17 00:00:00 2001
From: Nicolas Braud-Santoni <nicoo@debian.org>
Date: Tue, 15 Oct 2019 23:47:58 +0200
Subject: [PATCH] Stop shipping Python 2.x GObject Introspection bindings

Closes: #938837
---
 debian/control                 | 2 --
 debian/gir1.2-xapp-1.0.install | 2 +-
 debian/not-installed           | 2 ++
 debian/rules                   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index 1998bd2..2259f29 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,6 @@ Build-Depends:
  libx11-dev,
  libxkbfile-dev,
  meson (>= 0.40.0),
- python,
  python-gi-dev,
  python3,
  valac,
@@ -35,7 +34,6 @@ Architecture: any
 Depends:
  ${gir:Depends},
  ${misc:Depends},
- ${python:Depends},
  ${python3:Depends}
 Description: Introspection data for Xapp
  Xapp provides components which are common to multiple desktop environments
diff --git a/debian/gir1.2-xapp-1.0.install b/debian/gir1.2-xapp-1.0.install
index 4aad3fd..5f061bc 100644
--- a/debian/gir1.2-xapp-1.0.install
+++ b/debian/gir1.2-xapp-1.0.install
@@ -1,2 +1,2 @@
 usr/lib/*/girepository-1.0/XApp-1.0.typelib
-usr/lib/python*/dist-packages/gi/overrides/*.py
+usr/lib/python3/dist-packages/gi/overrides/*.py
diff --git a/debian/not-installed b/debian/not-installed
index 7ee4e92..b81038f 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -6,6 +6,8 @@ usr/bin/upload-system-info
 usr/bin/xfce4-set-wallpaper
 # We are not using libtool files
 usr/lib/*/libxapp.la
+# We are not using the Python 2 version
+usr/lib/python2.7/dist-packages/gi/overrides/*.py
 # python gi override files that must not install
 usr/lib/python*/dist-packages/gi/overrides/*.pyc
 usr/lib/python*/dist-packages/gi/overrides/*.pyo
diff --git a/debian/rules b/debian/rules
index 8a41b75..95fbe11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,now
 
 %:
-	dh $@ --with=gir,python2,python3
+	dh $@ --with=gir,python3
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-- 
2.23.0

Attachment: signature.asc
Description: PGP signature


Reply to: