Commits

Jason R. Coombs committed 0116a7f

Use py2exe-compatible __init__

  • Participants
  • Parent commits 86c6d5f
  • Tags 3.1

Comments (0)

Files changed (1)

File jaraco/__init__.py

 # this is a namespace package
+__import__('pkg_resources').declare_namespace(__name__)
+
 try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
+	# py2exe support (http://www.py2exe.org/index.cgi/ExeWithEggs)
+	import modulefinder
+	for p in __path__:
+		modulefinder.AddPackagePath(__name__, p)
 except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
+	pass