From 0d012fbfef200eedee01b0cdd6963908df751e5b Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 21 Aug 2008 13:52:18 -0700 Subject: [PATCH] Initial setup.py for py2exe and additional .hgignore entries for the generated py2exe directories. --- .hgignore | 4 ++++ setup.py | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 setup.py diff --git a/.hgignore b/.hgignore index 577a669..52bb7f2 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,10 @@ syntax: glob *.pyc *.swp +*~ luminotes.log +luminotes.db session/* files/* +build/* +dist/* diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..56ab1ee --- /dev/null +++ b/setup.py @@ -0,0 +1,27 @@ +import sys +import py2exe +from glob import glob +from distutils.core import setup + +def files( path ): + return glob( path.replace( "/", "\\" ) ) + +setup( + options = dict( + py2exe = dict( + packages = "cherrypy.filters", + includes = "email.header", + ) + ), + console = [ "luminotes.py" ], + data_files = [ + ( "", [ "luminotes.db", ] ), + ( "static/css", files( "static/css/*.*" ) ), + ( "static/html", files( "static/css/html/*.*" ) ), + ( "static/images", files( "static/images/*.*" ) ), # TODO: exclude images like screenshots that don't need to be included + ( "static/images/toolbar", files( "static/images/toolbar/*.*" ) ), + ( "static/images/toolbar/small", files( "static/images/toolbar/small/*.*" ) ), + ( "static/js", files( "static/js/*.*" ) ), + ( "files", [] ), + ], +)