Skip to content

Commit cc95fe7

Browse files
committed
✨ support python requires and support no code coverage
1 parent 790defa commit cc95fe7

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Change log
22
================================================================================
33

4+
-
5+
--------------------------------------------------------------------------------
6+
7+
**Added**
8+
9+
#. add python_requires in setup.py
10+
#. no code coverage support
11+
412
0.0.10 - tbd
513
--------------------------------------------------------------------------------
614

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pypi-mobans
77

88
.. image:: https://codecov.io/github/moremoban/pypi-mobans/coverage.png
99
:target: https://codecov.io/github/moremoban/pypi-mobans
10-
1110
.. image:: https://img.shields.io/github/stars/moremoban/pypi-mobans.svg?style=social&maxAge=3600&label=Star
1211
:target: https://github.com/moremoban/pypi-mobans/stargazers
1312

changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: pypi-mobans
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Added
6+
details:
7+
- "add python_requires in setup.py"
8+
- "no code coverage support"
49
- changes:
510
- action: Added
611
details:

templates/badges.rst.jj2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
{% else %}
2121
{% set suffix = '/coverage.png' %}
2222
{% endif %}
23+
{% if not no_code_coverage %}
2324
.. image:: https://codecov.io/{{base_path}}{{suffix}}
2425
:target: https://codecov.io/{{base_path}}
25-
26+
{% endif %}
2627
{% if release != "0.0.0" %}
2728
.. image:: https://badge.fury.io/py/{{name}}.svg
2829
:target: https://pypi.org/project/{{name}}

templates/setup.py.jj2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ CLASSIFIERS = [
177177
{% endblock %}
178178
]
179179

180+
{% if python_requires %}
181+
PYTHON_REQUIRES = "{{python_requires}}"
182+
{% endif %}
183+
180184
{%macro handle_complex_dependency(complex_one) -%}
181185
{%set dependency, condition = complex_one.split(";")%}
182186
{% if condition == 'python_version<"3"'%}
@@ -426,6 +430,9 @@ if __name__ == "__main__":
426430
{% if external_module_library %}
427431
ext_modules=[PYMODULE],
428432
{% else %}
433+
{% if python_requires %}
434+
python_requires=PYTHON_REQUIRES,
435+
{% endif %}
429436
extras_require=EXTRAS_REQUIRE,
430437
tests_require=["nose"],
431438
install_requires=INSTALL_REQUIRES,

0 commit comments

Comments
 (0)