hscommon.build¶
This module is a collection of function to help in HS apps build process.
-
hscommon.build.add_to_pythonpath(path)¶ Adds
pathto bothPYTHONPATHenv andsys.path.
-
hscommon.build.build_debian_changelog(changelogpath, destfile, pkgname, from_version=None, distribution='precise', fix_version=None)¶ Builds a debian changelog out of a YAML changelog.
Use fix_version to patch the top changelog to that version (if, for example, there was a packaging error and you need to quickly fix it)
-
hscommon.build.build_dmg(app_path, destfolder)¶ Builds a DMG volume with application at
app_pathand puts it indest_path.The name of the resulting DMG volume is determined by the app’s name and version.
-
hscommon.build.copy_packages(packages_names, dest, create_links=False, extra_ignores=None)¶ Copy python packages
packages_namestodest, spurious data.Copy will happen without tests, testdata, mercurial data or C extension module source with it.
py2appinclude and exclude rules are quite funky, and doing this is the only reliable way to make sure we don’t end up with useless stuff in our app.
-
hscommon.build.ensure_empty_folder(path)¶ Make sure that the path exists and that it’s an empty folder.
-
hscommon.build.filereplace(filename, outfilename=None, **kwargs)¶ Reads filename, replaces all {variables} in kwargs, and writes the result to outfilename.
-
hscommon.build.print_and_do(cmd)¶ Prints
cmdand executes it in the shell.