ソースを参照

fix grass/__init__.py

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37993 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 年 前
コミット
3e3983edb9
4 ファイル変更5 行追加5 行削除
  1. 1 2
      lib/python/Makefile
  2. 0 1
      lib/python/__init__.py
  3. 4 0
      lib/python/grass__init__.py
  4. 0 2
      swig/python/Makefile

+ 1 - 2
lib/python/Makefile

@@ -22,8 +22,7 @@ $(GDIR): $(PYDIR)
 
 $(DSTDIR): $(GDIR)
 	test -d $@ || $(MKDIR) -p $@
-	test -f __init__.py || touch $(GDIR)/__init__.py
-	@echo "import script" >> $(GDIR)/__init__.py
+	@cat grass__init__.py > $(GDIR)/__init__.py
 
 $(DSTDIR)/%: %
 	$(INSTALL_DATA) $< $@

+ 0 - 1
lib/python/__init__.py

@@ -2,4 +2,3 @@ from core   import *
 from db     import *
 from raster import *
 from vector import *
-

+ 4 - 0
lib/python/grass__init__.py

@@ -0,0 +1,4 @@
+import os
+__all__ = ["script"]
+if os.path.exists(os.path.join(os.path.dirname(__file__), "lib", "__init__.py")):
+    __all__.append("lib")

+ 0 - 2
swig/python/Makefile

@@ -65,8 +65,6 @@ $(GDIR): $(PYDIR)
 
 $(DSTDIR): $(GDIR)
 	test -d $@ || $(MKDIR) -p $@
-	test -f __init__.py || touch $(GDIR)/__init__.py
-	@echo "import lib" >> $(GDIR)/__init__.py
 
 $(DSTDIR)/_%.so: _%.so
 	$(INSTALL) $< $@