{# Copyright (C) 2023, CERN This software is distributed under the terms of the MIT licence, copied verbatim in the file "LICENSE". In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as Intergovernmental Organization or submit itself to any jurisdiction. #} {% extends "page.html" %} {% block title %} {{ project.name }} ยท {{ super() }} {% endblock title %} {% macro page_banner() %}

{{ project.name }} {{ version }}


{% if latest_version == version %} pip install {{ project.name }} {% else %} pip install {{ project.name }}=={{ version }} {% endif %}

{% if latest_release == release %}   Latest version {% else %}   Newer version available ({{ latest_release }}) {% endif %}

Released: {% set release_date=metadata['info']['creation_date'] %} {% if (release_date and release_date.year > 1990) %} {{ release_date.strftime('%b %d, %Y') }} {% else %} Unknown {% endif %}
{% endmacro %} {% block page_content %}
{{ page_banner() }}

Project Links {% set icon_lookup={ 'Documentation': 'fa-book', "Source": "fa-code-branch", "Source Code": "fa-code-branch", "Code": "fa-code-branch", "Tracker": "fa-bug", "Issues": "fa-bug", "Bug Tracker": "fa-bug", "Discussions": "fa-comments", "Changelog": "fa-scroll", "Homepage": "fa-home", } %} {# URLS to be reversed as per https://stackoverflow.com/a/56243786/741316 #} {% for name, url in metadata['info']['project_urls'].items() | reverse %} {% set fa_icon=icon_lookup.get(name.title(), 'fa-link') %} {% endfor %}

Meta {% if metadata['info']['author'] %}
Author: {{ metadata['info']['author'] }}
{% endif %} {% if metadata['info']['maintainer'] %}
Maintainer: {{ metadata['info']['maintainer'] }}
{% endif %} {% if metadata['info']['requires_python'] %}
Requires Python: {{ metadata['info']['requires_python'] }}
{% endif %}

Classifiers
{% for classifier_header, classifiers in metadata['info']['classifier_groups'] %}
{{ classifier_header }}
    {% for classifier in classifiers %}
  • {{ classifier.split('::', 1)[1] }}
  • {% endfor %}
{% endfor %}
{{ metadata['info']['description_html'] or 'Description not available' }}
{% for _version in releases|reverse %}
{{ _version }}
{% endfor %}
Download files for release:
{% for file in metadata['releases'][version] %}
{{ file['filename'] }} ({{ fmt_size(file['size']) }})
{% endfor %}
{% if not metadata['info']['requires_dist'] %} No dependencies {% else %} Dependencies:
{% for requirement in metadata['info']['requires_dist'] %}
{{ requirement.name }} {% if requirement.__str__() != requirement.name %} ({{ requirement }}) {% endif %}
{% endfor %} {% if not metadata['info']['requires_dist'] %} No dependencies! {% endif %}
{% endif %}
{% endblock page_content %} {% block extra_footer %} {% endblock extra_footer %}