def clean(): megarun(""" find jbrout -name "*.pyc" | xargs rm -fr find jbrout -name "*.orig" | xargs rm -fr find jbrout -name "*.rej" | xargs rm -fr find jbrout -name "*.bak" | xargs rm -fr find jbrout -name "*.gladep" | xargs rm -fr find jbrout -name "*.*~" | xargs rm -fr find dist -name "*.pyc" | xargs rm -fr rm -f jbrout/data/version.txt """)
def writeVersionFiles(): if os.path.isdir(os.path.join(basePath, '.git')): infoCmd = ["git","svn","info"] else: infoCmd = ["svn","info"] try: version=baseVersion + "." + re.search("(?<=Revision\: )\d+", run(infoCmd)).group() megarun(""" rm -f jbrout/data/version.txt rm -f dist/version.nsi""") open("jbrout/data/version.txt","w").write(version) open("dist/version.nsi","w").write('!define PRODUCT_VERSION "' + version + '"') except: print """Unable to build windows version without version number from svn,
def writeVersionFiles(): if os.path.isdir(os.path.join(basePath, '.git')): infoCmd = ["git", "svn", "info"] else: infoCmd = ["svn", "info"] try: version = baseVersion + "." + re.search("(?<=Revision\: )\d+", run(infoCmd)).group() megarun(""" rm -f jbrout/data/version.txt rm -f dist/version.nsi""") open("jbrout/data/version.txt", "w").write(version) open("dist/version.nsi", "w").write('!define PRODUCT_VERSION "' + version + '"') except: print """Unable to build windows version without version number from svn,
import os from libs import run,megarun,glob if __name__ == "__main__": #========================================================================== # CHDIR at the root of jbrout app #========================================================================== os.chdir(os.path.join(os.path.dirname(__file__),"..","jbrout")) #========================================================================== # Update and compile PO/MO of jbrout #========================================================================== # extract glade in tmp/*.h for i in glob(".",["glade"],excludes=["plugins/*"]): megarun('intltool-extract -l --type=gettext/glade %s'%i) # build a POTFILES.in for py and tmp/*.glade.h l=glob(".",["h","py"],excludes=["plugins/*"],absolute=False) open("po/POTFILES.in","w").write("\n".join(["[encoding: UTF-8]"]+l+[""])) # update the pot file megarun(""" cd po; intltool-update --pot --gettext-package=jbrout rm -rf tmp rm po/POTFILES.in """) # updates all po file, and compile to mo for i in glob("po",["po"]): f=i[:-3]
try: src = glob("packages/*.tar.gz")[0] except: src = None try: rpm = glob("packages/*.rpm")[0] except: rpm = None if deb: # make the 'binary' repository if not os.path.isdir("packages/binary"): os.makedirs("packages/binary") shutil.copy2(deb, "packages/binary") megarun(""" cd packages && dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz """) debs = glob("packages/binary/*") else: debs = [] print "-" * 75 print "DEBIAN : ", debs print "RPM : ", rpm print "SOURCE : ", src print "-" * 75 else: print "packages are not here ?!?" home = os.environ['HOME']
def mkWinStandAlone(): megarun('rm -f dist/jBrout-*-Setup.exe') megarun('makensis %s'% os.path.join('dist','StandAlone-py2.5.nsi'))
def mkWinLauncher(): megarun('rm -f dist/jBrout.exe') megarun('makensis %s'% os.path.join('dist','launcher.nsi'))
""" import os from libs import run, megarun, glob if __name__ == "__main__": # ========================================================================== # CHDIR at the root of jbrout app # ========================================================================== os.chdir(os.path.join(os.path.dirname(__file__), "..", "jbrout")) # ========================================================================== # Update and compile PO/MO of jbrout # ========================================================================== # extract glade in tmp/*.h for i in glob(".", ["glade"], excludes=["plugins/*"]): megarun("intltool-extract -l --type=gettext/glade %s" % i) # build a POTFILES.in for py and tmp/*.glade.h l = glob(".", ["h", "py"], excludes=["plugins/*"], absolute=False) open("po/POTFILES.in", "w").write("\n".join(["[encoding: UTF-8]"] + l + [""])) # update the pot file megarun( """ cd po; intltool-update --pot --gettext-package=jbrout rm -rf tmp rm po/POTFILES.in """ ) # updates all po file, and compile to mo
src = glob("packages/*.tar.gz")[0] except: src = None try: rpm = glob("packages/*.rpm")[0] except: rpm = None if deb: # make the 'binary' repository if not os.path.isdir("packages/binary"): os.makedirs("packages/binary") shutil.copy2(deb, "packages/binary") megarun( """ cd packages && dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz """ ) debs = glob("packages/binary/*") else: debs = [] print "-" * 75 print "DEBIAN : ", debs print "RPM : ", rpm print "SOURCE : ", src print "-" * 75 else: print "packages are not here ?!?" home = os.environ["HOME"]
def mkWinStandAlone(): megarun('rm -f dist/jBrout-*-Setup.exe') megarun('makensis %s' % os.path.join('dist', 'StandAlone-py2.5.nsi'))
def mkWinLauncher(): megarun('rm -f dist/jBrout.exe') megarun('makensis %s' % os.path.join('dist', 'launcher.nsi'))