FS#61535 - [gpsd] installs python modules into /usr/local

Attached to Project: Community Packages
Opened by Ladislav Laska (Krakonos) - Friday, 25 January 2019, 20:51 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 20 July 2019, 08:42 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: The package community/gpsd contains a few python modules, for example 'gpsfake'. Currently, running gpsfake errors out with:

ModuleNotFoundError: No module named 'gps'

I suspect this is because the gps python module is installed into /usr/local/lib/python3.7/site-packages (instead just /usr/lib/...).

Package version: 3.18.1-1



Steps to reproduce:

run /bin/gpsfake
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 20 July 2019, 08:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  gpsd 3.19-1
Comment by Eli Schwartz (eschwartz) - Friday, 25 January 2019, 21:01 GMT
And of course namcap throws numerous objections at this.
Comment by Clayton Craft (craftyguy) - Sunday, 17 February 2019, 20:46 GMT
The 'bug' actually appears to be SConstruct, upstream is replacing /usr/lib/ with /usr/local/lib in python_libdir.. http://git.savannah.gnu.org/cgit/gpsd.git/tree/SConstruct#n1064

This patch removes this silly hard coding of python libdir from SConstruct:


--------------------------------------------------------------------------------------------------------------

diff --git a/SConstruct b/SConstruct
index b8f3fb1..e133ece 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1034,8 +1034,6 @@ else:
# follow FHS, put in /usr/local/libXX, not /usr/libXX
# may be lib, lib32 or lib64
python_libdir = polystr(python_libdir)
- python_libdir = python_libdir.replace("/usr/lib",
- "/usr/local/lib")

py_config_text = config.GetPythonValue('config vars',
PYTHON_SYSCONFIG_IMPORT,

--------------------------------------------------------------------------------------------------------------



Alternatively, you could detect the python lib dir in the PKGBUILD and pass it to scons with "python_libdir=<path>". I have tested both methods and they install the python bits to the right location.
Comment by Clayton Craft (craftyguy) - Sunday, 17 February 2019, 20:47 GMT
Attaching patch to SConstruct..
Comment by Clayton Craft (craftyguy) - Monday, 18 February 2019, 00:47 GMT
Attaching patch to SConstruct..
Comment by Clayton Craft (craftyguy) - Monday, 18 February 2019, 00:47 GMT
Attaching patch to SConstruct..
Comment by Parker Reed (parkerlreed) - Sunday, 24 March 2019, 20:58 GMT
Any update on this? Package is still broken with respects to python.

Loading...