Skip to content

Commit 1270fc2

Browse files
committed
🤝 Merge branch 'master' of https://github.com/moremoban/setupmobans
2 parents d155d43 + ae6f631 commit 1270fc2

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

templates/conf.py.jj2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ extensions = [
1515
{%block SPHINX_EXTENSIONS%}
1616
{%endblock%}
1717
]
18-
{%block custom_varaibles%}
19-
{%endblock%}
2018
intersphinx_mapping = {
2119
{%block intersphinx_mapping%}
2220
{%endblock%}

templates/setup.py.jj2

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,25 @@ LICENSE = '{{license}}'
3131
MAINTAINER = '{{maintainer}}'
3232
MAINTAINER_CONTACT = '{{maintainer_contact}}'
3333
{% endif %}
34-
{% if command_line_interface %}
34+
{% if command_line_interface or entry_points %}
3535
ENTRY_POINTS = {
36+
{% if not entry_points or 'console_scripts' not in entry_points %}
3637
'console_scripts': [
3738
'{{command_line_interface}} = {{ entry_point }}'
38-
]
39+
],
40+
{% endif %}
41+
{% if entry_points %}
42+
{% for group_name, items in entry_points.items() %}
43+
'{{group_name}}': [
44+
{% if group_name == 'console_scripts' and command_line_interface %}
45+
'{{command_line_interface}} = {{ entry_point }}',
46+
{% endif %}
47+
{% for item in items %}
48+
'{{item}}',
49+
{% endfor %}
50+
],
51+
{% endfor %}
52+
{% endif %}
3953
}
4054
{% endif %}
4155
DESCRIPTION = (
@@ -267,7 +281,7 @@ if __name__ == '__main__':
267281
packages=PACKAGES,
268282
include_package_data=True,
269283
zip_safe=False,
270-
{% if command_line_interface %}
284+
{% if command_line_interface or entry_points %}
271285
entry_points=ENTRY_POINTS,
272286
{% endif %}
273287
{% endif%}

0 commit comments

Comments
 (0)