{# ZETUP | Zimmermann's Extensible Tools for Unified Project_setups
##
## Copyright (C) 2014-2019 Stefan Zimmermann <user@zimmermann.co>
##
## ZETUP is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## ZETUP is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with ZETUP. If not, see <http://www.gnu.org/licenses/>.
#}

{%- block header %}{{ zetup_header }}{% endblock %}
{% block imports -%}
from __future__ import print_function

from setuptools import setup
{%- endblock %}

{% block pre_setup %}{% endblock %}
{% block setup -%}
dist = None
try:
    dist = setup(
        {% block setup_keywords -%}
        setup_requires=["zetup >= {{ zetup.__version__ }}"],

        use_zetup=True,
        {%- endblock %}
    )
finally:
    if dist is not None and hasattr(dist, 'zetup_made'):
        del dist.zetup_made
{%- endblock %}
{% block post_setup %}{% endblock %}
