public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pylibmount: correctly import from pylibmount.so
@ 2013-11-21 17:25 Dave Reisner
  2013-12-01 15:49 ` Dave Reisner
  2013-12-02 10:15 ` Karel Zak
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Reisner @ 2013-11-21 17:25 UTC (permalink / raw)
  To: util-linux; +Cc: Dave Reisner

Without this, python is unable to find the module:

$ 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'

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
 libmount/python/libmount/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmount/python/libmount/__init__.py b/libmount/python/libmount/__init__.py
index 243c639..09104e2 100644
--- a/libmount/python/libmount/__init__.py
+++ b/libmount/python/libmount/__init__.py
@@ -1,2 +1,2 @@
-from pylibmount import *
+from .pylibmount import *
 
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pylibmount: correctly import from pylibmount.so
  2013-11-21 17:25 [PATCH] pylibmount: correctly import from pylibmount.so Dave Reisner
@ 2013-12-01 15:49 ` Dave Reisner
  2013-12-02 10:15 ` Karel Zak
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Reisner @ 2013-12-01 15:49 UTC (permalink / raw)
  To: Dave Reisner; +Cc: util-linux

Just wanted to make sure this didn't get lost...

On Thu, Nov 21, 2013 at 12:25:27PM -0500, Dave Reisner wrote:
> Without this, python is unable to find the module:
> 
> $ 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'
> 
> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
> ---
>  libmount/python/libmount/__init__.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmount/python/libmount/__init__.py b/libmount/python/libmount/__init__.py
> index 243c639..09104e2 100644
> --- a/libmount/python/libmount/__init__.py
> +++ b/libmount/python/libmount/__init__.py
> @@ -1,2 +1,2 @@
> -from pylibmount import *
> +from .pylibmount import *
>  
> -- 
> 1.8.4.2
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pylibmount: correctly import from pylibmount.so
  2013-11-21 17:25 [PATCH] pylibmount: correctly import from pylibmount.so Dave Reisner
  2013-12-01 15:49 ` Dave Reisner
@ 2013-12-02 10:15 ` Karel Zak
  1 sibling, 0 replies; 3+ messages in thread
From: Karel Zak @ 2013-12-02 10:15 UTC (permalink / raw)
  To: Dave Reisner; +Cc: util-linux

On Thu, Nov 21, 2013 at 12:25:27PM -0500, Dave Reisner wrote:
> Without this, python is unable to find the module:
> 
> $ 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'

 Hmm... it seems we have always tested this with PYTHONPATH=...

> -from pylibmount import *
> +from .pylibmount import *

 Applied, thanks.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-02 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 17:25 [PATCH] pylibmount: correctly import from pylibmount.so Dave Reisner
2013-12-01 15:49 ` Dave Reisner
2013-12-02 10:15 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox