Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 864567

Summary: sci-geosciences/qgis-3.22.5[python]: required <=dev-python/psycopg-2.9.3 at run time
Product: Gentoo Linux Reporter: Benoit Gschwind <gschwind>
Component: Current packagesAssignee: Sci-geo Project <sci-geosciences>
Status: RESOLVED NEEDINFO    
Severity: minor CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Benoit Gschwind 2022-08-09 15:05:45 UTC
With the python keywords qgis run, but generate an error: failed to import psycopg2.

the module psycopg2 is available in dev-python/psycopg-2.9.3 and not in dev-python/psycopg-3.0.0 and above.

installing psycopg-2.9.3 manually fix the issue.

Best regards.

Reproducible: Always

Steps to Reproduce:
1. USE="python" emerge qgis
2. run qgis from command line

Actual Results:  
qgis prompt the error: failed to import psycopg2

Expected Results:  
qgis do not fail to load python script, and do not show any error
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-10 03:41:26 UTC
That's a bit confusing because all ebuilds for qgis in tree depend on psycopg:2. It should get pulled in for you.

I don't understand why it wasn't?
Comment 2 Benoit Gschwind 2022-08-10 07:31:21 UTC
Hello,

I think this is because I disabled postgres keywords:

[ebuild   R    ] sci-geosciences/qgis-3.22.5::gentoo  USE="python -3d -examples -georeferencer -grass -hdf5 -mapserver -netcdf -opencl -oracle -pdal -polar -postgres -qml -serial" PYTHON_SINGLE_TARGET="python3_9 -python3_8 -python3_10"

Best regards
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-10 08:48:15 UTC
Ah, that'd do it ;)

Do you have it configured to use Postgres then in some file?
Comment 4 Benoit Gschwind 2022-08-10 16:10:27 UTC
Hello,

To fix the issue I do :

emerge psycopg:2

manually

I think psycopg:2 should be added as dependancy when python use flag is enbable.

Best regards