{% macro describe_source(source_type_text, source_json_dict, is_package=False) %}
Source Type:
{% if is_package and (source_type_text == "link" or source_type_text == "upload") %}
No default source
{# source types link & upload only make sense for builds, not for packages #} {% else %}
{{ source_type_text | build_source_description }}
{% endif %} {% if source_type_text == "link" and not is_package %}
Package URL:
{{ source_json_dict["url"] }}
{% elif source_type_text == "upload" and not is_package %}
File Name:
{{ source_json_dict["pkg"] }}
{% elif source_type_text == "git_and_tito" %}
Git URL:
{{ source_json_dict["git_url"] }}
Local directory in Git:
{{ source_json_dict["git_dir"] }}
Git branch:
{{ source_json_dict["git_branch"] }}
Using test mode:
{{ source_json_dict["tito_test"] }}
{% elif source_type_text == "mock_scm" %}
SCM type:
{{ source_json_dict["scm_type"] }}
SCM URL:
{{ source_json_dict["scm_url"] }}
SCM branch:
{{ source_json_dict["scm_branch"] }}
SCM subdirectory:
{{ source_json_dict["scm_subdir"] }}
Path to .spec file:
{{ source_json_dict["spec"] }}
{% elif source_type_text == "pypi" %}
PyPI package name
{{ source_json_dict["pypi_package_name"] }}
{% if source_json_dict["pypi_package_version"] %}
PyPI package version
{{ source_json_dict["pypi_package_version"] }}
{% endif %}
for Python
{{ ', '.join(source_json_dict["python_versions"]).strip(', ') }}
{% endif %} {% if source_type_text == "rubygems" %}
Gem name:
{{ source_json_dict["gem_name"] }}
{% endif %} {% endmacro %}