Commit Graph

36 Commits

Author SHA1 Message Date
Karel Zak ee312c654b docs: fix "behaviour" vs. "behavior"
Sometimes we use "behaviour" and "behavior" in the same text, let's
use "behavior" only everywhere.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-06 09:49:35 +02:00
Ruediger Meier 15b2606c4f tests: fix python tests for dist and out-of-tree builds
- add python helper scripts to the dist
- helper scripts are always in srcdir
- python libs are in builddir
- abort tests if helpers are missing

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-06-04 10:14:24 +02:00
Ruediger Meier 15cb27895d build-sys: use automake's PYTHON primary for __init__.py
Actually the initial reason for this commit was to remove execute
permission from installed __init__.py.

Now after discovering automake's _PYTHON suffix we slightly cleanup
Makemodule.am and we will install byte compiled .pyc and .pyo files.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-06-03 13:12:43 +02:00
Ruediger Meier a400c2ad0e build-sys: libmount/python/__init__.py is always a dist file
"make dist" and "make distcheck" should work after a bare
./configure to give us a full featured tar ball.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-13 17:48:09 +01:00
Karel Zak ecdec6d866 pylibmount: import directly from pylibmount in tests
This change does not have any impact to in a standard way installed
libmount impact. It's simplification for in-tree tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14 17:40:47 +01:00
Karel Zak 34330d2bea pylibmount: remove unncessary subdirectory
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14 17:40:47 +01:00
Dave Reisner c8e5e6e732 pylibmount: correctly import from pylibmount.so
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>
2013-12-02 10:59:31 +01:00
Sami Kerola 5d324c6b94 various: fix mixing declarations and code compiler warnings [smatch]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-10-08 15:47:59 +02:00
Karel Zak 1d4d4b42e6 pylibmount: check for mnt_fs_get_tag() return value [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-01 17:18:54 +02:00
Karel Zak 21ca031559 pylibmount: make tab parsers more robust [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-01 17:15:08 +02:00
Karel Zak 6073251ca8 build-sys: one install dir for all pylibmount stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-27 14:23:38 +02:00
Karel Zak e4d394fa36 build-sys: add pylibmount __init__.py EXTRA_DIST
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-26 14:02:40 +02:00
Karel Zak 808c876512 build-sys: install to the correct python dirs
It seems we have to call AM_PATH_PYTHON() monster to get
pyexec (shared libs) and python (scripts) directories.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-26 12:55:30 +02:00
Ondrej Oprala 464074532c pylibmount: rewrite to be py2/py3 universal
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-20 12:48:53 +02:00
Karel Zak 8e5c467500 build-sys: support --with-python[={2,3}]
* we use pkg-config to get CGLAGS and LIBS, use package specific
   config (e.g. python-config) is non-sense.

 * default is to follow distribution and use pkg-config module name
   "python". This is probably symlink to python2.pc or python3.pc.

 * --with-python=2 forces to pkg-module "python2 >= 2"

 * --with-python=3 forces to pkg-module "python3 >= 3"

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-20 12:42:45 +02:00
Karel Zak 40e5013ce5 pylibmount: improve helps strings formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-22 13:24:05 +02:00
Karel Zak b7e47ac1ac pylibmount: add debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-22 12:10:13 +02:00
Karel Zak 20b222ec5c pylibmount: use libmount reference counting
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-22 09:44:38 +02:00
Karel Zak 6d5189376d pylibmount: remove Context_get_table()
It's too problematic and too low-level to support it Py binding.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-21 10:06:15 +02:00
Karel Zak a4ac8f0385 pylibmount: cleanup cxt usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-21 10:02:19 +02:00
Karel Zak 73d5b4ebdb pylibmount: remove unnecessary code
It's enough to call mnt_free_fs() to remove fs from the table.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 17:52:47 +02:00
Karel Zak c643ad4d81 pylibmount: coding style changes, don't touch Context() status
It's better to follow libmnt_context status than allow to play any
nasty games with this important variables in Python.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 14:01:39 +02:00
Karel Zak 2d59ffa15a pylibmount: use only public libmount API in tab.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 13:52:09 +02:00
Karel Zak 278b5be599 pylibmount: cleanup *_HELP strings formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 12:07:24 +02:00
Karel Zak 279a6d5f41 pylibmount: use mnt_fs_set_userdata() rather than ->userdata
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 11:32:49 +02:00
Karel Zak a2cb025024 pylibmount: fs.c - cleanup, remove libmount private stuff
* remove unnecessary comments
 * cleanup up strings format
 * remove direct access to private libmount stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 11:08:07 +02:00
Karel Zak 71fbe15192 pylibmount: remove bindsrc from fs API
It's unnecessary and very low-level.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-20 10:49:14 +02:00
Karel Zak 5c7664f735 pylibmount: cleanup object names
Cxt -> Context
	Tab -> Table

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 17:10:07 +02:00
Karel Zak 6b47d7f5c7 pylibmount: coding style changes in tab.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 16:57:50 +02:00
Karel Zak 679f086c54 pylibmount: coding style changes in fs.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 16:51:23 +02:00
Karel Zak 77733ec880 pylibmount: coding style changes in context.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 16:41:04 +02:00
Karel Zak 15c2e011a7 build-sys: install pylibmount into
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 15:24:33 +02:00
Ondrej Oprala 90eb39874f pylibmount: add regression tests
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 15:11:06 +02:00
Ondrej Oprala 3246f4b98c pylibmount: add __init__.py
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-08-19 15:06:37 +02:00
Ondrej Oprala 813683a352 pylibmount: basic code
[kzak@redhat.com: - split to more patches
                  - split to more .c files]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 15:00:15 +02:00
Karel Zak d78df0ac65 build-sys: add pylibmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 14:57:21 +02:00