I do not know exactly why this bug arises, but here are the facts: - when I download http://ftp.de.debian.org/debian/pool/main/p/python-pyqtgraph/python3-pyqtgraph_0.10.0-4_all.deb and inspect this package, it misses the directory /usr/lib/python3/pyqtgraph/widget, hence the error message reported in the bug report: "ModuleNotFoundError: No module named 'pyqtgraph.widgets'"
- when I tried to know why this directory is missing from the package, I cloned the fork https://salsa.debian.org/georgesk/python-pyqtgraph and built the package again with debuild: then, the same bug happens: /usr/lib/python3/pyqtgraph/widget is missing again - I patched the file setup.py, in order to view better le list of packages and sub-packages which were to install, and added a single line to print a message with the value of the variable allPackages: [line 68] print("Hello, allPackages =", allPackages) it happens that 'pyqtgraph.widget' is part of the list allPackages sometimes, and sometimes, not. THIS IS WEIRD! - it seems that the function listAllPackages from the module tools.setupHelpers is not completely reliable, though I have no precise idea why. I could get a valid list of packages by calling this function from Python3 in interactive mode. I have no time to create a minimal example which can raise that buggy behavior, I just suspect that is come from Python's internals. - here is attached a patch which provides the right list of packages as a hard-coded list. This list has been returned by the function listAllPackages() in interactive mode, and contains "pyqtgraph.widgets"; with that patch, the package is effective again. I propose a pull request for this patch, in Salsa. Best regards, Georges. -- Georges KHAZNADAR et Jocelyne FOURNIER 22 rue des mouettes, 59240 Dunkerque France. Téléphone +33 (0)3 28 29 17 70
Index: python-pyqtgraph/setup.py =================================================================== --- python-pyqtgraph.orig/setup.py +++ python-pyqtgraph/setup.py @@ -63,8 +63,8 @@ sys.path.insert(0, os.path.join(path, 't import setupHelpers as helpers ## generate list of all sub-packages -allPackages = (helpers.listAllPackages(pkgroot='pyqtgraph') + - ['pyqtgraph.'+x for x in helpers.listAllPackages(pkgroot='examples')]) +allPackages = ['pyqtgraph', 'pyqtgraph.GraphicsScene', 'pyqtgraph.util', 'pyqtgraph.util.colorama', 'pyqtgraph.tests', 'pyqtgraph.parametertree', 'pyqtgraph.opengl', 'pyqtgraph.opengl.items', 'pyqtgraph.pixmaps', 'pyqtgraph.graphicsItems', 'pyqtgraph.graphicsItems.PlotItem', 'pyqtgraph.graphicsItems.ViewBox', 'pyqtgraph.flowchart', 'pyqtgraph.flowchart.library', 'pyqtgraph.metaarray', 'pyqtgraph.widgets', 'pyqtgraph.dockarea', 'pyqtgraph.canvas', 'pyqtgraph.multiprocess', 'pyqtgraph.imageview', 'pyqtgraph.exporters', 'pyqtgraph.exporters.tests', 'pyqtgraph.console'] + ['pyqtgraph.'+x for x in helpers.listAllPackages(pkgroot='examples')] + ## Decide what version string to use in the build version, forcedVersion, gitVersion, initVersion = helpers.getVersionStrings(pkg='pyqtgraph')
signature.asc
Description: PGP signature