[Fasttran-checkins] fasttran setup.py,1.3,1.4
Status: Alpha
Brought to you by:
a1s
From: alexander s. <a1...@us...> - 2007-02-18 11:10:57
|
Update of /cvsroot/fasttran/fasttran In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv28263 Modified Files: setup.py Log Message: build standalone installer with py2exe & InnoSetup Index: setup.py =================================================================== RCS file: /cvsroot/fasttran/fasttran/setup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** setup.py 17 Feb 2007 07:53:53 -0000 1.3 --- setup.py 18 Feb 2007 11:10:51 -0000 1.4 *************** *** 1,9 **** ! """fasttran setup script ! ! @copyright 2007 alexander smishlajev <al...@ty...> ! ! """ # FIXME: generate_docs() must be reimplemented as a distutils command <als> """History (most recent first): 17-feb-2007 [als] include docs 14-feb-2007 [als] added long_description; --- 1,6 ---- ! """fasttran setup script""" # FIXME: generate_docs() must be reimplemented as a distutils command <als> """History (most recent first): + 18-feb-2007 [als] build standalone installer with py2exe & InnoSetup 17-feb-2007 [als] include docs 14-feb-2007 [als] added long_description; *************** *** 14,18 **** __date__ = "$Date$"[7:-2] ! from distutils.core import setup import glob import os --- 11,16 ---- __date__ = "$Date$"[7:-2] ! from distutils.core import setup, Command ! from distutils.file_util import write_file import glob import os *************** *** 43,46 **** --- 41,77 ---- """ + ISS=""" + [Setup] + AppName=fasttran + AppVerName=fasttran version %(version)s + AppCopyright=\xA9 2007 alexander smishlajev <al...@Ty...> + AppPublisherURL=http://fasttran.sourceforge.net/ + VersionInfoVersion=%(version)s + DefaultDirName={pf}\\fasttran + DefaultGroupName=fasttran + SourceDir=.. + SetupIconFile=fasttran\\fasttran.ico + UninstallDisplayIcon={app}\\data\\fasttran.ico + Compression=lzma + SolidCompression=yes + TimeStampsInUTC=yes + OutputDir=dist + OutputBaseFilename=fasttran-%(version)s-setup + + [Files] + Source: "dist\\bin\\*.*"; DestDir: "{app}" + Source: "dist\\bin\\Lib\\site-packages\\fasttran\\*.*"; DestDir: "{app}\\data" + Source: "doc\\*.html"; DestDir: "{app}\\doc" + Source: "doc\\README.html"; DestDir: "{app}\\doc"; Flags: isreadme + Source: "README"; DestDir: "{app}\\doc" + Source: "CHANGES"; DestDir: "{app}\\doc" + Source: "LICENSE"; DestDir: "{app}\\doc" + + [Icons] + Name: "{group}\\fasttran"; Filename: "{app}\\fasttran.exe"; \ + IconFilename: "{app}\\data\\fasttran.ico"; WorkingDir: "{userdocs}" + Name: "{group}\\README"; Filename: "{app}\\doc\\README.html" + """ + def get_version(): """Return package version string""" *************** *** 86,89 **** --- 117,144 ---- rst2html(_source, _target) + class installer(Command): + + description = "create standalone installer" + + user_options = [ + ('iscc=', None, "InnoSetup executable path"), + ] + + def initialize_options(self): + self.iscc = None + + def finalize_options(self): + if self.iscc == None: + self.iscc = os.path.join(os.environ["ProgramFiles"], + "Inno Setup 5", "ISCC.exe") + + def run(self): + self.run_command("py2exe") + _iss_file = os.path.join("build", "setup.iss") + self.execute(write_file, + (_iss_file, [ISS % {"version": self.distribution.get_version()}]), + "writing InnoSetup script to '%s'" % _iss_file) + self.spawn([self.iscc, _iss_file]) + def run(): if publish_cmdline: *************** *** 123,127 **** console=["scripts/fasttran"], data_files=[ ! (DATA_DIR, glob.glob("fasttran/*.txt") + glob.glob("fasttran/*.srx") + glob.glob("fasttran/*.wex")), --- 178,183 ---- console=["scripts/fasttran"], data_files=[ ! (DATA_DIR, ["fasttran/fasttran.ico"] ! + glob.glob("fasttran/*.txt") + glob.glob("fasttran/*.srx") + glob.glob("fasttran/*.wex")), *************** *** 129,132 **** --- 185,189 ---- + glob.glob("doc/*.html")), ], + cmdclass={"installer": installer}, options={"py2exe": { "optimize": 2, |