Bug#938874: yum-metadata-parser: Python2 removal in sid/bullseye

2019-09-25 Thread Kentaro Hayashi
On Mon, 23 Sep 2019 09:36:24 -0700 Mike Miller  wrote:
> Much more helpful long term would be to contribute to getting
> createrepo_c (#912338) and dnf (no ITP yet) into Debian so these Python
> 2 packages can be dropped.

It seems that waiting #912338 task is better in long term surely.

Regards,



Bug#938874: yum-metadata-parser: Python2 removal in sid/bullseye

2019-09-23 Thread Mike Miller
On Sun, Sep 22, 2019 at 00:51:34 +0900, Kentaro Hayashi wrote:
> I'm not familiar with yum-metadata-parser at all, but
> I'm not willing to remove createrepo (it depends yum-metadata-parser)
> So, I've tried to fix this issue by adding python3 version.

Adding Python 3 support to yum-metadata-parser will not have much of an
impact. But if you want to proceed with an nmu or adopt this package,
feel free, this package is up for adoption, as well as createrepo.

Much more helpful long term would be to contribute to getting
createrepo_c (#912338) and dnf (no ITP yet) into Debian so these Python
2 packages can be dropped.

-- 
mike


signature.asc
Description: PGP signature


Bug#938874: yum-metadata-parser: Python2 removal in sid/bullseye

2019-09-21 Thread Kentaro Hayashi
Hi, 

I'm not familiar with yum-metadata-parser at all, but
I'm not willing to remove createrepo (it depends yum-metadata-parser)
So, I've tried to fix this issue by adding python3 version.

I've added debdiff patch (may be not so good in shape), but I hope 
it will help.

-- 
Regards,
diff -Nru yum-metadata-parser-1.1.4/debian/changelog yum-metadata-parser-1.1.4/debian/changelog
--- yum-metadata-parser-1.1.4/debian/changelog	2013-06-03 00:55:17.0 +0900
+++ yum-metadata-parser-1.1.4/debian/changelog	2019-09-22 00:34:31.0 +0900
@@ -1,3 +1,15 @@
+yum-metadata-parser (1.1.4-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches/fix-python37-setup-error.patch
+- Add patch to fix setup error with Python 3.x
+  * debian/control
+- Support python3-sqlitecachec.
+  * debian/rules
+- Build python2,python3 packages.
+
+ -- Kentaro Hayashi   Sun, 22 Sep 2019 00:34:31 +0900
+
 yum-metadata-parser (1.1.4-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru yum-metadata-parser-1.1.4/debian/control yum-metadata-parser-1.1.4/debian/control
--- yum-metadata-parser-1.1.4/debian/control	2013-06-03 00:55:17.0 +0900
+++ yum-metadata-parser-1.1.4/debian/control	2019-09-22 00:34:31.0 +0900
@@ -1,10 +1,17 @@
 Source: yum-metadata-parser
 Section: python
-Priority: extra
+Priority: optional
 Maintainer: Mike Miller 
-Build-Depends: debhelper (>= 9), python3-all-dev, pkg-config, libglib2.0-dev, libsqlite3-dev, libxml2-dev
+Build-Depends: debhelper (>= 9),
+ python-all-dev (>= 2.6.6-3~),
+ python3-all-dev (>= 3.7.3-1~),
+ pkg-config,
+ libglib2.0-dev,
+ libsqlite3-dev,
+ libxml2-dev
 Standards-Version: 3.9.4
-X-Python-Version: >= 2.4
+X-Python-Version: >= 2.7k.16
+X-Python3-Version: >= 3.7
 Homepage: http://yum.baseurl.org/
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/mtmiller-guest/yum-metadata-parser.git
 Vcs-Git: git://anonscm.debian.org/users/mtmiller-guest/yum-metadata-parser.git
@@ -16,4 +23,13 @@
 Description: Fast metadata parser for yum
  Python module providing a fast metadata parser for yum implemented in C.
  The sqlitecachec module is used by createrepo and the yum package manager
+ to update and query local caches of RPM package repositories.
+
+Package: python3-sqlitecachec
+Architecture: any
+Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends}
+Provides: ${python3:Provides}
+Description: Fast metadata parser for yum
+ Python module providing a fast metadata parser for yum implemented in C.
+ The sqlitecachec module is used by createrepo and the yum package manager
  to update and query local caches of RPM package repositories.
diff -Nru yum-metadata-parser-1.1.4/debian/patches/fix-python37-setup-error.patch yum-metadata-parser-1.1.4/debian/patches/fix-python37-setup-error.patch
--- yum-metadata-parser-1.1.4/debian/patches/fix-python37-setup-error.patch	1970-01-01 09:00:00.0 +0900
+++ yum-metadata-parser-1.1.4/debian/patches/fix-python37-setup-error.patch	2019-09-22 00:29:26.0 +0900
@@ -0,0 +1,21 @@
+--- a/setup.py
 b/setup.py
+@@ -2,15 +2,15 @@
+ from distutils.core import setup, Extension
+ 
+ pc = os.popen("pkg-config --cflags-only-I glib-2.0 libxml-2.0 sqlite3", "r")
+-includes = map(lambda x:x[2:], string.split(pc.readline()))
++includes = list(map(lambda x:x[2:], pc.readline().split()))
+ pc.close()
+ 
+ pc = os.popen("pkg-config --libs-only-l glib-2.0 libxml-2.0 sqlite3", "r")
+-libs = map(lambda x:x[2:], string.split(pc.readline()))
++libs = list(map(lambda x:x[2:], pc.readline().split()))
+ pc.close()
+ 
+ pc = os.popen("pkg-config --libs-only-L glib-2.0 libxml-2.0 sqlite3", "r")
+-libdirs = map(lambda x:x[2:], string.split(pc.readline()))
++libdirs = list(map(lambda x:x[2:], pc.readline().split()))
+ pc.close()
+ 
+ module = Extension('_sqlitecache',
diff -Nru yum-metadata-parser-1.1.4/debian/patches/series yum-metadata-parser-1.1.4/debian/patches/series
--- yum-metadata-parser-1.1.4/debian/patches/series	1970-01-01 09:00:00.0 +0900
+++ yum-metadata-parser-1.1.4/debian/patches/series	2019-09-22 00:26:56.0 +0900
@@ -0,0 +1 @@
+fix-python37-setup-error.patch
diff -Nru yum-metadata-parser-1.1.4/debian/python-sqlitecachec.install yum-metadata-parser-1.1.4/debian/python-sqlitecachec.install
--- yum-metadata-parser-1.1.4/debian/python-sqlitecachec.install	1970-01-01 09:00:00.0 +0900
+++ yum-metadata-parser-1.1.4/debian/python-sqlitecachec.install	2019-09-21 23:13:47.0 +0900
@@ -0,0 +1,3 @@
+usr/lib/python2.*/dist-packages/*.py
+usr/lib/python2.*/dist-packages/*.so
+
diff -Nru yum-metadata-parser-1.1.4/debian/python3-sqlitecachec.install yum-metadata-parser-1.1.4/debian/python3-sqlitecachec.install
--- yum-metadata-parser-1.1.4/debian/python3-sqlitecachec.install	1970-01-01 09:00:00.0 +0900
+++ yum-metadata-parser-1.1.4/debian/python3-sqlitecachec.install	2019-09-21 23:14:13.0 +0900
@@ -0,0 +1,3 @@
+usr/lib/python3.*/dist-packages/*.py