diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-05-09 10:28:12 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-09 06:37:14 -0700 |
commit | 972458a74780923e7e867b9362dda1830eeefe5e (patch) | |
tree | 811ec8d209b865723ee572e7a78752ddf2b4df10 /xlators | |
parent | 961bef293f52f84f584ac4bb02ac50117d12e118 (diff) |
glupy: package glupy as a subpackage under gluster namespace
Currently glupy files resides in gluster namespace of python site packages.
The other projects like libgfapi-python ..etc are evolving and need to share
the gluster namespace. The current structure makes things difficult as all
subpackages have its own __init__ files and other files.
One subpackage can not any more own gluster namespace.
The attempt is to make below structure for gluster namespace so that
it is more portable and scalable for future use.
<sitepackages>/gluster/
|
-- __init__.py
|
|
-- glupy
|
-- __init__.py
-- glupy.py
-- ........
|
|
-- gfapi
|
-- __init__.py
-- gfapi.py
-- ........
By above structure clients can import:
>>> from gluster import glupy
>>> from gluster import gfapi
libgfapi-python project has been moved to this structure via
http://review.gluster.org/#/c/9668/
Cherry picked from commit 40df2ed4d098d4cd2c6abbed23e497ac3e2e5804:
> Change-Id: I54886200ddb6a4153a74d9e187aeca7cad79ef9e
> BUG: 1211900
> Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
> Reviewed-on: http://review.gluster.org/10248
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
This backport is really minimal, because commit 44036808 removed the
need for the changes in the glusterfs.spec.in file.
Change-Id: I54886200ddb6a4153a74d9e187aeca7cad79ef9e
BUG: 1220022
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10706
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/glupy/src/Makefile.am | 2 | ||||
-rw-r--r-- | xlators/features/glupy/src/__init__.py.in | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/glupy/src/Makefile.am b/xlators/features/glupy/src/Makefile.am index 655f95369be..2ac0d99cd5f 100644 --- a/xlators/features/glupy/src/Makefile.am +++ b/xlators/features/glupy/src/Makefile.am @@ -14,7 +14,7 @@ glupy_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ noinst_HEADERS = glupy.h -# Install glupy.py into the Python site-packages area +# Install __init__.py into the Python site-packages area pyglupydir = @BUILD_PYTHON_SITE_PACKAGES@/gluster pyglupy_PYTHON = __init__.py diff --git a/xlators/features/glupy/src/__init__.py.in b/xlators/features/glupy/src/__init__.py.in index e69de29bb2d..3ad9513f40e 100644 --- a/xlators/features/glupy/src/__init__.py.in +++ b/xlators/features/glupy/src/__init__.py.in @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) |