Skip to content

Commit 9d9e7b7

Browse files
committed
setup.py.jj2: Adds Python version classifiers
This commit adds python version classifiers to help user setting up his mobanfile Closes #7
1 parent 55392da commit 9d9e7b7

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
@@ -84,12 +86,33 @@ CLASSIFIERS = [
8486
'Topic :: Software Development :: Libraries',
8587
'Programming Language :: Python',
8688
'Intended Audience :: Developers',
89+
{% if min_python_version <= ['2', '6'] %}
8790
'Programming Language :: Python :: 2.6',
91+
{%- endif %}
92+
93+
{% if min_python_version <= ['2', '7'] %}
8894
'Programming Language :: Python :: 2.7',
95+
{%- endif %}
96+
97+
{%- if min_python_version[0] == '3' %}
98+
'Programming Language :: Python :: 3 :: Only',
99+
{%- endif %}
100+
101+
{% if min_python_version <= ['3','3'] %}
89102
'Programming Language :: Python :: 3.3',
103+
{%- endif %}
104+
105+
{% if min_python_version <= ['3','4'] %}
90106
'Programming Language :: Python :: 3.4',
107+
{%- endif %}
108+
109+
{% if min_python_version <= ['3','5'] %}
91110
'Programming Language :: Python :: 3.5',
111+
{%- endif %}
112+
113+
{% if min_python_version <= ['3','6'] %}
92114
'Programming Language :: Python :: 3.6',
115+
{% endif %}
93116
{%block additional_classifiers%}
94117
{%endblock %}
95118
]

0 commit comments

Comments
 (0)