Skip to content

Commit 43f4148

Browse files
authored
Merge pull request #61 from SerekKiri/version-classifiers
Adds Python version classifiers
2 parents 808a80c + 9d9e7b7 commit 43f4148

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

templates/setup.py.jj2

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
{% block shebang %}
55
#!/usr/bin/env python3
66
{% endblock %}
7+
{% set min_python_version = min_python_version|default('2.6') %}
8+
{% set min_python_version = min_python_version.split('.', 2) %}
79

810
{% block header %}
911
# Template by pypi-mobans
@@ -106,12 +108,33 @@ CLASSIFIERS = [
106108
'Topic :: Software Development :: Libraries',
107109
'Programming Language :: Python',
108110
'Intended Audience :: Developers',
111+
{% if min_python_version <= ['2', '6'] %}
109112
'Programming Language :: Python :: 2.6',
113+
{%- endif %}
114+
115+
{% if min_python_version <= ['2', '7'] %}
110116
'Programming Language :: Python :: 2.7',
117+
{%- endif %}
118+
119+
{%- if min_python_version[0] == '3' %}
120+
'Programming Language :: Python :: 3 :: Only',
121+
{%- endif %}
122+
123+
{% if min_python_version <= ['3','3'] %}
111124
'Programming Language :: Python :: 3.3',
125+
{%- endif %}
126+
127+
{% if min_python_version <= ['3','4'] %}
112128
'Programming Language :: Python :: 3.4',
129+
{%- endif %}
130+
131+
{% if min_python_version <= ['3','5'] %}
113132
'Programming Language :: Python :: 3.5',
133+
{%- endif %}
134+
135+
{% if min_python_version <= ['3','6'] %}
114136
'Programming Language :: Python :: 3.6',
137+
{% endif %}
115138
{%block additional_classifiers%}
116139
{%endblock %}
117140
]

0 commit comments

Comments
 (0)