From c4fe4abe2c04b438e5a1fb6b606a4994b08bf639 Mon Sep 17 00:00:00 2001 From: Nicole Harris Date: Wed, 24 Sep 2025 07:11:27 +0100 Subject: [PATCH 1/5] Only show wheel filters if there is more than one wheel --- warehouse/templates/packaging/detail.html | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/warehouse/templates/packaging/detail.html b/warehouse/templates/packaging/detail.html index b29903e561b7..fad2de4babcf 100644 --- a/warehouse/templates/packaging/detail.html +++ b/warehouse/templates/packaging/detail.html @@ -441,13 +441,13 @@

data-controller="filter-list">

{% trans %}Download files{% endtrans %}

- {% trans href='https://packaging.python.org/tutorials/installing-packages/', title=gettext('External link') %}Download the file for your platform. If you're not sure which to choose, learn more about installing packages.{% endtrans %} + {% trans href='https://packaging.python.org/en/latest/discussions/package-formats/#package-formats', title=gettext('External link') %}For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.{% endtrans %}

{% trans count=sdists|length %} - Source Distribution + Source distribution (sdist) {% pluralize %} - Source Distributions + Source distributions (sdists) {% endtrans %}

{% if sdists %} @@ -457,30 +457,24 @@

-
+
{% trans %}No source distribution files available for this release.{% endtrans %} {% trans href='https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives', title=gettext('External link') %}See tutorial on generating distribution archives.{% endtrans %}
{% endif %} + {% if bdists %} + {% set bdist_count = bdists|length %}

- {% trans count=bdists|length %} - Built Distribution + {% trans count=bdist_count %} + Built distribution (wheel) {% pluralize %} - Built Distributions + Built distributions (wheels) {% endtrans %}

- -

- {% trans href='https://packaging.python.org/en/latest/specifications/binary-distribution-format/', title=gettext('External link') %}If you're not sure about the file name format, learn more about wheel file names.{% endtrans %} -

+ {% if bdist_count > 1 %}