in tools/build-release.py [0:0]
def call_gpg(tarball_file, email_address):
cmd = shutil.which("gpg")
if not cmd:
print("gpg not found on the path, not signing package")
return
print("Signing source code file using email: %s" % email_address)
command = [cmd, '--armor', '--detach-sig']
command.extend(['--local-user', email_address])
command.extend(['--output', tarball_file + ".asc", tarball_file])
retcode = subprocess.call(command)
if retcode:
fail("failed to create gpg signature")