# Copyright 1999-{{ year }} Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Ebuild generated by g-pypi {{ gpypi_version }}
{% if warnings -%}
    {% for warn in warnings %}
    # Warning: {{ warn }}
    {% endfor %}
{%- endif %}

EAPI="3"
SUPPORT_PYTHON_ABIS="1"
{% if tests_method %}
DISTUTILS_SRC_TEST="{{ tests_method }}"
{% endif %}

inherit {{ inherit|join(" ") }}

{% for value in my_pn %}
MY_PN="{{ value }}"
{% endfor %}
{% for value in my_pv %}
MY_PV="{{ value }}"
{% endfor %}
{% if my_p %}
MY_P="{{ my_p }}"
{% endif %}

DESCRIPTION="{{ options.description }}"
HOMEPAGE="{{ options.homepage }}"
{% if esvn_repo_uri %}
ESVN_REPO_URI="{{ esvn_repo_uri }}"
{% else %}
{# TODO: SRC_URI="{{ src_uri|join(" ") }}" #}
SRC_URI="{{ src_uri }}"
{% endif %}

LICENSE="{{ options.license }}"
KEYWORDS="{{ options.gentoo_keywords }}"
SLOT="{{ slot }}"
IUSE="{{ use|join(" ") }}"

{% if depend %}
DEPEND="{{ depend|list|sort|join("\n\t") }}"
{% endif %}
{% if depend and depend == rdepend %}
RDEPEND="${DEPEND}"
{% elif rdepend %}
RDEPEND="{{ rdepend|list|sort|join("\n\t") }}"
{% endif %}

{% if s %}
S="{{ s }}"
{% endif %}
{% if python_modname %}
PYTHON_MODNAME="{{ python_modname|join(" ") }}"
{% endif %}

{% if docs_dir or examples_dir %}
src_install() {
    distutils_src_install
{% if docs_dir %}
    if use doc; then
        dodoc -r {{ docs_dir }}
    fi
{% endif %}
{% if examples_dir %}
    if use examples; then
        insinto /usr/share/doc/"${PF}"/
        doins -r {{ examples_dir }}
    fi
{% endif %}
}
{% endif %}
