# dupeGuru 4.3.1 documentation

## hscommon.build

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

hscommon.build.add_to_pythonpath(path: PathLike) → None

  Adds `path` to both `PYTHONPATH` env and `sys.path`.

hscommon.build.build_debian_changelog(changelogpath: PathLike, destfile: PathLike, pkgname: str, from_version: Optional[str] = None, distribution: str = 'precise', fix_version: Optional[str] = None) → 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: PathLike, destfolder: PathLike) → None

  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: List[str], dest: PathLike, create_links: bool = False, extra_ignores: Optional[List[str]] = None) → 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.filereplace(filename: PathLike, outfilename: Optional[PathLike] = None, **kwargs) → None

  Reads filename, replaces all {variables} in kwargs, and writes the result to outfilename.

hscommon.build.print_and_do(cmd: str) → int

  Prints `cmd` and executes it in the shell.