Skip to content

Commit fb734be

Browse files
committed
📚 update setup.py for c extensions
1 parent 04c1021 commit fb734be

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

templates/badges.rst.jj2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
:target: https://github.com/{{organisation}}/{{name}}/stargazers
4242
{% endif %}
4343

44-
.. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=模版更新&color=blue&style=flat-square
45-
:target: https://github.com/moremoban/moban
44+
.. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square
45+
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects
4646

4747
.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square
4848
:target: https://github.com/psf/black

templates/setup.py.jj2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ PUBLISH_COMMAND = "{0} setup.py sdist upload -r pypi".format(sys.executable)
256256
{% else %}
257257
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
258258
{% endif %}
259+
260+
{% if external_module_library %}
259261
GS_COMMAND = ("gs {{name}} v{{release}} " +
260262
"Find {{release}} in changelog for more details")
261263
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
@@ -307,7 +309,7 @@ class PublishCommand(Command):
307309
SETUP_COMMANDS.update({
308310
"publish": PublishCommand
309311
})
310-
312+
{% endif %}
311313

312314
def has_gease():
313315
"""
@@ -444,5 +446,7 @@ if __name__ == "__main__":
444446
{% endif %}
445447
{% endif%}
446448
classifiers=CLASSIFIERS,
449+
{% if external_module_library %}
447450
cmdclass=SETUP_COMMANDS
451+
{% endif %}
448452
)

0 commit comments

Comments
 (0)