Skip to content

Commit

Permalink
fix windows version. add packages to py2exe
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Nov 8, 2011
1 parent 0d931e9 commit 6c6bb8b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
2 changes: 0 additions & 2 deletions MANIFEST.in
Expand Up @@ -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 *
Expand Down
8 changes: 4 additions & 4 deletions couchapp/autopush/winwatcher.py
Expand Up @@ -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__)

Expand Down
7 changes: 5 additions & 2 deletions couchapp/generator.py
Expand Up @@ -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__

Expand Down
18 changes: 18 additions & 0 deletions setup.py
Expand Up @@ -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"
]
},

Expand Down

0 comments on commit 6c6bb8b

Please sign in to comment.