[Debian-med-packaging] Bug#937262: Help needed (Was: pdb2pqr: Python2 removal in sid/bullseye)

Andreas Tille tille at debian.org
Fri Dec 13 21:10:03 GMT 2019


On Fri, Dec 13, 2019 at 10:49:45PM +0500, Andrey Rahmatullin wrote:
> > I think at least this is solved now:
> > 
> >    https://salsa.debian.org/med-team/pdb2pqr/commit/1f4ee901456641140ef18ca8e91e4701e1175410
> 
> Nice catch, "env.Append(LIBS=[python_lib])" where "python_lib = 'python' +
> gcv('VERSION')" is definitely the cause.

Yes.  I've now a state where the package builds and installs.  However,
just calling pdb2pqr fails with

i$ pdb2pqr
Traceback (most recent call last):
  File "/usr/bin/pdb2pqr", line 52, in <module>
    from main import mainCommand
  File "/usr/share/pdb2pqr/main.py", line 77, in <module>
    import extensions
  File "/usr/share/pdb2pqr/extensions/__init__.py", line 56, in <module>
    extDict[extName] = __import__(extName,globals(),locals(),[], -1)
ValueError: level must be >= 0


So I tried:

--- a/extensions/__init__.py
+++ b/extensions/__init__.py
@@ -53,7 +53,7 @@ _extList = [name for _, name, _ in pkgutil.iter_modules(__path__)]
 extDict = {}
 
 for extName in _extList:
-    extDict[extName] = __import__(extName,globals(),locals(),[], -1)
+    extDict[extName] = __import__(extName,globals(),locals(),[], 0)^M
     
 def setupExtensionsOptions(parser):
     """


which leads to:

$ pdb2pqr
Traceback (most recent call last):
  File "/usr/bin/pdb2pqr", line 52, in <module>
    from main import mainCommand
  File "/usr/share/pdb2pqr/main.py", line 77, in <module>
    import extensions
  File "/usr/share/pdb2pqr/extensions/__init__.py", line 57, in <module>
    extDict[extName] = __import__(extName,globals(),locals(),[], 0)
ModuleNotFoundError: No module named 'chi'


I admit I have no clue whether my change was valid nor what to try next.

Kind regards

       Andreas.

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list