1. Thomas Waldmann
  2. moin-2.0

Commits

Thomas Waldmann  committed 6039878

mksupport: create required package __init__.py files

  • Participants
  • Parent commits 8143d27
  • Branches gae

Comments (0)

Files changed (1)

File contrib/mksupport/mksupport.py

View file
 # List of files and directories to be ignored specific to the project
 SPECIFIC_IGNORED_FILES = ['sphinx', 'py.test*', 'pytest*.py', '_pytest', 'py', 'execnet', 'pep8.py', 'selenium', 'werkzeug/testsuite', 'flask/testsuite', 'distribute', 'pip']
 
+# List of pathes where we have to create a __init__.py (usually namespace packages)
+CREATE_PACKAGE_INIT = ["flaskext", "xstatic", "xstatic/pkg", ]
+
 # Path to the tar file generated by setup.py sdist
 DIST_PATH = "dist/moin-2.0.0a0.tar.gz"
 
     for name in GENERAL_IGNORED_FILES + SPECIFIC_IGNORED_FILES:
         for path in glob.glob(os.path.join(SUPPORT_PATH, name)):
             delete_file_or_dir(path)
+    for dirname in CREATE_PACKAGE_INIT:
+        fname = os.path.join(SUPPORT_PATH, dirname, '__init__.py')
+        with open(fname, "w") as f:
+            pass  # empty file is enough
 
 
 def make_supportdist():