Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#37861 - [util-linux] python bindings to libmount don't work

Attached to Project: Arch Linux
Opened by Nikos Skalkotos (skalkoto) - Thursday, 21 November 2013, 12:13 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 12 December 2013, 15:34 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

If you try to import libmount from python you get: importError: No module named 'pylibmount'

Additional info:
* util-linux 2.24-1


Steps to reproduce:

python -c 'import libmount'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/libmount/__init__.py", line 1, in <module>
from pylibmount import *
ImportError: No module named 'pylibmount'
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 12 December 2013, 15:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  util-linux 2.24-2
Comment by Nikos Skalkotos (skalkoto) - Monday, 25 November 2013, 08:28 GMT
The problem is that python by default will not load libraries from /usr/lib/python3.3/site-packages/libmount/. If you assign the aforementioned path in PYTHONPATH environmental variable, it will work:

$ export PYTHONPATH=/usr/lib/python3.3/site-packages/libmount/
$ python -c 'import libmount'
$
Comment by Dave Reisner (falconindy) - Monday, 25 November 2013, 14:03 GMT
Not really. The problem is a missing dot in the __init__.py file. I sent a patch upstream a few days ago:

http://www.spinics.net/lists/util-linux-ng/msg08569.html
Comment by Dave Reisner (falconindy) - Monday, 02 December 2013, 17:56 GMT
Upstream patch accepted. There's probably a few other midterm patches we could backport before v2.24.1 is tagged, so I'll see what I can do about getting a new package together for [testing] ...

Loading...