# dupeGuru 4.0.4 documentation

## hscommon.build

This module is a collection of function to help in HS apps build process.

hscommon.build.add_to_pythonpath(path)

  Adds `path` to both `PYTHONPATH` env and `sys.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_path` and puts it in `dest_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_names` to `dest`, spurious data.

  Copy will happen without tests, testdata, mercurial data or C extension module source with it. `py2app` include 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 `cmd` and executes it in the shell.