[GRASS-SVN] r55919 - in grass/trunk: gui/wxpython gui/wxpython/animation gui/wxpython/core gui/wxpython/dbmgr gui/wxpython/gcp gui/wxpython/gmodeler gui/wxpython/gui_core gui/wxpython/iclass gui/wxpython/lmgr gui/wxpython/location_wizard gui/wxpython/mapdisp gui/wxpython/mapswipe gui/wxpython/modules gui/wxpython/nviz gui/wxpython/psmap gui/wxpython/rlisetup gui/wxpython/vdigit gui/wxpython/vnet gui/wxpython/web_services gui/wxpython/wxplot tools
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 19 06:48:40 PDT 2013
Author: wenzeslaus
Date: 2013-04-19 06:48:40 -0700 (Fri, 19 Apr 2013)
New Revision: 55919
Added:
grass/trunk/gui/wxpython/animation/__init__.py
grass/trunk/gui/wxpython/core/__init__.py
grass/trunk/gui/wxpython/dbmgr/__init__.py
grass/trunk/gui/wxpython/gcp/__init__.py
grass/trunk/gui/wxpython/gmodeler/__init__.py
grass/trunk/gui/wxpython/gui_core/__init__.py
grass/trunk/gui/wxpython/iclass/__init__.py
grass/trunk/gui/wxpython/lmgr/__init__.py
grass/trunk/gui/wxpython/location_wizard/__init__.py
grass/trunk/gui/wxpython/mapdisp/__init__.py
grass/trunk/gui/wxpython/mapswipe/__init__.py
grass/trunk/gui/wxpython/modules/__init__.py
grass/trunk/gui/wxpython/nviz/__init__.py
grass/trunk/gui/wxpython/psmap/__init__.py
grass/trunk/gui/wxpython/rlisetup/__init__.py
grass/trunk/gui/wxpython/vdigit/__init__.py
grass/trunk/gui/wxpython/vnet/__init__.py
grass/trunk/gui/wxpython/web_services/__init__.py
grass/trunk/gui/wxpython/wxplot/__init__.py
grass/trunk/tools/create_python_init_file.py
Removed:
grass/trunk/gui/wxpython/create__init__.py
Modified:
grass/trunk/gui/wxpython/Makefile
Log:
wxGUI: python package init files now part of source code (not in created my make, script for creation is in tools)
Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile 2013-04-19 13:31:31 UTC (rev 55918)
+++ grass/trunk/gui/wxpython/Makefile 2013-04-19 13:48:40 UTC (rev 55919)
@@ -34,7 +34,6 @@
$(PYDSTDIRS): %: | $(ETCDIR)
$(MKDIR) $@
- $(call run_grass,$(PYTHON) create__init__.py $@)
$(DSTDIRS): %: | $(ETCDIR)
$(MKDIR) $@
Added: grass/trunk/gui/wxpython/animation/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/animation/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/animation/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,12 @@
+all = [
+ 'nviztask',
+ 'temporal_manager',
+ 'dialogs',
+ 'mapwindow',
+ 'g.gui.animation',
+ 'controller',
+ 'anim',
+ 'toolbars',
+ 'utils',
+ 'frame',
+ ]
Property changes on: grass/trunk/gui/wxpython/animation/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/core/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/core/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/core/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,16 @@
+all = [
+ 'debug',
+ 'gcmd',
+ 'treemodel',
+ 'ws',
+ 'menutree',
+ 'gconsole',
+ 'events',
+ 'render',
+ 'units',
+ 'settings',
+ 'workspace',
+ 'utils',
+ 'globalvar',
+ 'giface',
+ ]
Property changes on: grass/trunk/gui/wxpython/core/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Deleted: grass/trunk/gui/wxpython/create__init__.py
===================================================================
--- grass/trunk/gui/wxpython/create__init__.py 2013-04-19 13:31:31 UTC (rev 55918)
+++ grass/trunk/gui/wxpython/create__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import glob
-
-def main(path):
- if not os.path.exists(path) or not os.path.isdir(path):
- print >> sys.stderr, "'%s' is not a directory" % path
- return 1
-
- modules = []
- for f in glob.glob(os.path.join(os.path.basename(path), '*.py')):
- if f[-5:-3] == '__':
- continue
- modules.append(os.path.splitext(os.path.basename(f))[0])
-
- fd = open(os.path.join(path, '__init__.py'), 'w')
- try:
- fd.write('all = [%s' % os.linesep)
- for m in modules:
- fd.write(" '%s',%s" % (m, os.linesep))
- fd.write(' ]%s' % os.linesep)
- finally:
- fd.close()
-
- return 0
-
-if __name__ == "__main__":
- if len(sys.argv) < 2:
- sys.exit("usage: %s path/to/gui_modules" % sys.argv[0])
-
- sys.exit(main(sys.argv[1]))
Added: grass/trunk/gui/wxpython/dbmgr/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/dbmgr/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,8 @@
+all = [
+ 'g.gui.dbmgr',
+ 'sqlbuilder',
+ 'vinfo',
+ 'manager',
+ 'base',
+ 'dialogs',
+ ]
Property changes on: grass/trunk/gui/wxpython/dbmgr/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/gcp/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/gcp/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,5 @@
+all = [
+ 'manager',
+ 'mapdisplay',
+ 'toolbars',
+ ]
Property changes on: grass/trunk/gui/wxpython/gcp/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/gmodeler/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/gmodeler/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,10 @@
+all = [
+ 'preferences',
+ 'g.gui.gmodeler',
+ 'menudata',
+ 'model',
+ 'pystc',
+ 'dialogs',
+ 'toolbars',
+ 'frame',
+ ]
Property changes on: grass/trunk/gui/wxpython/gmodeler/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/gui_core/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/gui_core/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,16 @@
+all = [
+ 'query',
+ 'widgets',
+ 'preferences',
+ 'menu',
+ 'dialogs',
+ 'mapwindow',
+ 'mapdisp',
+ 'gselect',
+ 'ghelp',
+ 'prompt',
+ 'goutput',
+ 'forms',
+ 'toolbars',
+ 'treeview',
+ ]
Property changes on: grass/trunk/gui/wxpython/gui_core/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/iclass/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/iclass/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,9 @@
+all = [
+ 'digit',
+ 'plots',
+ 'dialogs',
+ 'g.gui.iclass',
+ 'toolbars',
+ 'statistics',
+ 'frame',
+ ]
Property changes on: grass/trunk/gui/wxpython/iclass/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/lmgr/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/lmgr/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,8 @@
+all = [
+ 'layertree',
+ 'menudata',
+ 'toolbars',
+ 'pyshell',
+ 'frame',
+ 'giface',
+ ]
Property changes on: grass/trunk/gui/wxpython/lmgr/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/location_wizard/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/location_wizard/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/location_wizard/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,5 @@
+all = [
+ 'wizard',
+ 'base',
+ 'dialogs',
+ ]
Property changes on: grass/trunk/gui/wxpython/location_wizard/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/mapdisp/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/mapdisp/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,9 @@
+all = [
+ 'overlays',
+ 'main',
+ 'statusbar',
+ 'mapwindow',
+ 'toolbars',
+ 'frame',
+ 'gprint',
+ ]
Property changes on: grass/trunk/gui/wxpython/mapdisp/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/mapswipe/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/mapswipe/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,7 @@
+all = [
+ 'g.gui.mapswipe',
+ 'dialogs',
+ 'mapwindow',
+ 'toolbars',
+ 'frame',
+ ]
Property changes on: grass/trunk/gui/wxpython/mapswipe/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/modules/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/modules/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/modules/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,7 @@
+all = [
+ 'mcalc_builder',
+ 'extensions',
+ 'vclean',
+ 'colorrules',
+ 'histogram',
+ ]
Property changes on: grass/trunk/gui/wxpython/modules/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/nviz/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/nviz/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,9 @@
+all = [
+ 'preferences',
+ 'main',
+ 'mapwindow',
+ 'tools',
+ 'wxnviz',
+ 'workspace',
+ 'animation',
+ ]
Property changes on: grass/trunk/gui/wxpython/nviz/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/psmap/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/psmap/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,9 @@
+all = [
+ 'g.gui.psmap',
+ 'menudata',
+ 'dialogs',
+ 'instructions',
+ 'toolbars',
+ 'utils',
+ 'frame',
+ ]
Property changes on: grass/trunk/gui/wxpython/psmap/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/rlisetup/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/rlisetup/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,6 @@
+all = [
+ 'g.gui.rlisetup',
+ 'wizard',
+ 'functions',
+ 'frame',
+ ]
Property changes on: grass/trunk/gui/wxpython/rlisetup/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/vdigit/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/vdigit/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,10 @@
+all = [
+ 'preferences',
+ 'main',
+ 'wxdigit',
+ 'dialogs',
+ 'mapwindow',
+ 'wxdisplay',
+ 'g.gui.vdigit',
+ 'toolbars',
+ ]
Property changes on: grass/trunk/gui/wxpython/vdigit/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/vnet/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/vnet/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,5 @@
+all = [
+ 'widgets',
+ 'dialogs',
+ 'toolbars',
+ ]
Property changes on: grass/trunk/gui/wxpython/vnet/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/web_services/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/web_services/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/web_services/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,5 @@
+all = [
+ 'widgets',
+ 'cap_interface',
+ 'dialogs',
+ ]
Property changes on: grass/trunk/gui/wxpython/web_services/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/wxplot/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/__init__.py (rev 0)
+++ grass/trunk/gui/wxpython/wxplot/__init__.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,7 @@
+all = [
+ 'scatter',
+ 'base',
+ 'dialogs',
+ 'profile',
+ 'histogram',
+ ]
Property changes on: grass/trunk/gui/wxpython/wxplot/__init__.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Copied: grass/trunk/tools/create_python_init_file.py (from rev 55906, grass/trunk/gui/wxpython/create__init__.py)
===================================================================
--- grass/trunk/tools/create_python_init_file.py (rev 0)
+++ grass/trunk/tools/create_python_init_file.py 2013-04-19 13:48:40 UTC (rev 55919)
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+"""
+Script for creating an __init__.py file for a package.
+
+Adds all modules (*.py files) in a directory into an __init__.py file.
+Overwrites existing __init__.py file in a directory.
+
+(C) 2011-2013 by the GRASS Development Team
+
+This program is free software under the GNU General Public License
+(>=v2). Read the file COPYING that comes with GRASS for details.
+
+ at author Martin Landa <landa.martin gmail.com>
+ at author Vaclav Petras <wenzeslaus gmail.com>
+"""
+
+
+import os
+import sys
+import glob
+
+
+def main(path):
+ if not os.path.exists(path) or not os.path.isdir(path):
+ print >> sys.stderr, "'%s' is not a directory" % path
+ return 1
+
+ modules = []
+ pattern = os.path.join(path, '*.py')
+ for f in glob.glob(pattern):
+ if f[-5:-3] == '__':
+ continue
+ modules.append(os.path.splitext(os.path.basename(f))[0])
+
+ fd = open(os.path.join(path, '__init__.py'), 'w')
+ try:
+ fd.write('all = [%s' % os.linesep)
+ for m in modules:
+ fd.write(" '%s',%s" % (m, os.linesep))
+ fd.write(' ]%s' % os.linesep)
+ finally:
+ fd.close()
+
+ return 0
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2:
+ sys.exit("usage: %s path/to/package/directory" % sys.argv[0])
+
+ sys.exit(main(sys.argv[1]))
More information about the grass-commit
mailing list