Permalink
Browse files

fix windows version. add packages to py2exe

  • Loading branch information...
benoitc committed Nov 8, 2011
1 parent 0d931e9 commit 6c6bb8baeade053dd2fac3a2b12d9df6b4dc9870
Showing with 27 additions and 8 deletions.
  1. +0 −2 MANIFEST.in
  2. +4 −4 couchapp/autopush/winwatcher.py
  3. +5 −2 couchapp/generator.py
  4. +18 −0 setup.py
View
@@ -2,8 +2,6 @@ include LICENSE
include NOTICE
include README.rst
include THANKS
-recursive-include couchapp/autopush/*
-recursive-include couchapp/autopush/watchdog *
recursive-include couchapp/templates *
recursive-include tests/testapp *
recursive-include resources *
@@ -6,10 +6,10 @@
import logging
import time
-from . import DEFAULT_UPDATE_DELAY
-from .handler import CouchappEventHandler
-from .pathtools.path import absolute_path
-from .watchdog.observers import Observer
+from couchapp.autopush import DEFAULT_UPDATE_DELAY
+from couchapp.autopush.handler import CouchappEventHandler
+from pathtools.path import absolute_path
+from watchdog.observers import Observer
log = logging.getLogger(__name__)
View
@@ -185,10 +185,13 @@ def copy_helper(path, directory, tname="templates"):
def find_template_dir(name, directory=''):
paths = ['%s' % name, os.path.join('..', name)]
if hasattr(sys, 'frozen'): # py2exe
- modpath = sys.executable
+ if os.environ.get("_MEIPASS2") is not None:
+ modpath = os.environ.get("_MEIPASS2")
+ else:
+ modpath = sys.executable
elif sys.platform == "win32" or os.name == "nt":
modpath = os.path.join(sys.prefix, "Lib", "site-packages",
- "couchapp", "templates")
+ "couchapp", "templates")
else:
modpath = __file__
View
@@ -180,6 +180,24 @@ def main():
'dll_excludes': [
"kernelbase.dll",
"powrprof.dll"
+ ],
+ 'packages': [
+ "http_parser",
+ "restkit",
+ "restkit.manager",
+ "restkit.contrib",
+ "pathtools.path",
+ "brownie",
+ "brownie.datastructures",
+ "watchdog",
+ "watchdog.observers",
+ "watchdog.tricks",
+ "watchdog.utils",
+ "win32pdh",
+ "win32pdhutil",
+ "win32api",
+ "win32con",
+ "subprocess"
]
},

0 comments on commit 6c6bb8b

Please sign in to comment.