* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-09-04 0:15 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2014-09-04 0:15 UTC (permalink / raw
To: gentoo-commits
commit: fc93a0cb2d302de4d405778f77e98839c2638b2a
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Sep 4 00:14:14 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fc93a0cb
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory. They are not as easily predictable.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 14 +++-----------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 93%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..d961574 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -80,17 +80,9 @@ class Modules(object):
defaults to the directory name of this file + '.modules'
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index e0e6910..0fe723b 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-09-04 1:18 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2014-09-04 1:18 UTC (permalink / raw
To: gentoo-commits
commit: 054f287ca55f292ec968b34ef296988141b356b6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Sep 4 01:18:02 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=054f287c
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory. They are not as easily predictable.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 14 +++-----------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 93%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..d961574 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -80,17 +80,9 @@ class Modules(object):
defaults to the directory name of this file + '.modules'
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index e0e6910..0fe723b 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-09-05 4:38 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2014-09-05 4:38 UTC (permalink / raw
To: gentoo-commits
commit: 1594c91d2908d41a585ed5b74a7943ba27a29b3e
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Sep 4 07:20:43 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1594c91d
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory. They are not as easily predictable.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 14 +++-----------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 93%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..d961574 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -80,17 +80,9 @@ class Modules(object):
defaults to the directory name of this file + '.modules'
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index e0e6910..0fe723b 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-09-05 21:15 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2014-09-05 21:15 UTC (permalink / raw
To: gentoo-commits
commit: 16fedf8ab4a34816ea80e3749f6c1bb28045188c
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Sep 5 20:26:14 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=16fedf8a
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory. They are not as easily predictable.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 14 +++-----------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 93%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..d961574 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -80,17 +80,9 @@ class Modules(object):
defaults to the directory name of this file + '.modules'
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index f0d1c05..2b3dbad 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-09-27 2:20 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2014-09-27 2:20 UTC (permalink / raw
To: gentoo-commits
commit: 3fd088ac3f9eb20b09c27bce96a8c35889565dc1
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Sep 27 01:40:45 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3fd088ac
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory. They are not as easily predictable.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 14 +++-----------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 93%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..d961574 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -80,17 +80,9 @@ class Modules(object):
defaults to the directory name of this file + '.modules'
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index f0d1c05..2b3dbad 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-09-29 18:29 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2014-09-29 18:29 UTC (permalink / raw
To: gentoo-commits
commit: ed1c62e00843690a586ee634a8a05a6b5cc7dd18
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Sep 29 17:20:21 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ed1c62e0
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory. They are not as easily predictable.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 14 +++-----------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 93%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..d961574 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -80,17 +80,9 @@ class Modules(object):
defaults to the directory name of this file + '.modules'
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index f0d1c05..2b3dbad 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/
@ 2014-12-01 21:50 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2014-12-01 21:50 UTC (permalink / raw
To: gentoo-commits
commit: fd34c5aa8678937af7e1a458acb0c7694f1c3294
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 4 00:13:03 2014 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 1 21:49:40 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fd34c5aa
Move module.py and progress.py from emaint to portage namespace
This makes it more centrally available as it is used by more than just the emaint module.
moule.py: make path and namepace params mandatory.
They are not as easily predictable.
Clean dead code.
---
pym/portage/emaint/main.py | 12 +++++++++---
pym/portage/{emaint => }/module.py | 23 +++++------------------
pym/portage/{emaint => }/progress.py | 0
pym/portage/sync/__init__.py | 2 +-
pym/portage/sync/controller.py | 2 +-
5 files changed, 16 insertions(+), 23 deletions(-)
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
import portage
from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
from portage.emaint.defaults import DEFAULT_OPTIONS
from portage.util._argparse import ArgumentParser
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
- module_controller = Modules(namepath="portage.emaint.modules")
+ module_path = os.path.join(
+ (os.path.dirname(
+ os.path.realpath(__file__))), "modules"
+ )
+ module_controller = Modules(
+ path=module_path,
+ namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 87%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..a78bb2e 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -74,29 +74,16 @@ class Modules(object):
"""Dynamic modules system for loading and retrieving any of the
installed emaint modules and/or provided class's
- @param path: Optional path to the "modules" directory or
- defaults to the directory of this file + '/modules'
- @param namepath: Optional python import path to the "modules" directory or
- defaults to the directory name of this file + '.modules'
+ @param path: Path to the "modules" directory
+ @param namepath: Python import path to the "modules" directory
"""
- def __init__(self, path=None, namepath=None):
- if path:
- self._module_path = path
- else:
- self._module_path = os.path.join((
- os.path.dirname(os.path.realpath(__file__))), "modules")
- if namepath:
- self._namepath = namepath
- else:
- self._namepath = '.'.join(os.path.dirname(
- os.path.realpath(__file__)), "modules")
+ def __init__(self, path, namepath):
+ self._module_path = path
+ self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
- #self.modules = {}
- #for mod in self.module_names:
- #self.module[mod] = LazyLoad(
def _get_all_modules(self):
"""scans the emaint modules dir for loadable modules
diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py
diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
import os
-from portage.emaint.module import Modules
+from portage.module import Modules
from portage.sync.controller import SyncManager
from portage.sync.config_checks import check_type
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index f0d1c05..2b3dbad 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
import portage
from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
#from portage.emaint.defaults import DEFAULT_OPTIONS
#from portage.util._argparse import ArgumentParser
from portage.util import writemsg_level
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-01 21:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-04 1:18 [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/, pym/portage/emaint/, pym/portage/ Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2014-12-01 21:50 Michał Górny
2014-09-29 18:29 Brian Dolbec
2014-09-27 2:20 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05 4:38 Brian Dolbec
2014-09-04 0:15 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox