@@ -15,7 +15,9 @@ from shutil import rmtree
15
15
{% if external_module_library %}
16
16
from distutils.core import setup, Extension
17
17
{% else %}
18
- from setuptools import setup, find_packages, Command
18
+
19
+ from setuptools import Command, setup, find_packages
20
+
19
21
{%endif%}
20
22
{%block platform_block%}
21
23
from platform import python_implementation
@@ -70,13 +72,12 @@ FILES = ['README.rst',{%block morefiles %}{%endblock%} 'CHANGELOG.rst']
70
72
{% endif %}
71
73
{% endif %}
72
74
KEYWORDS = [
75
+ 'python',
73
76
{% for keyword in keywords %}
74
77
'{{keyword}}',
75
78
{% endfor %}
76
- {% if additional_keywords %}
77
- {{ additional_keywords -}}
78
- {% endif %}
79
- 'python',
79
+ {%block additional_keywords -%}
80
+ {%endblock%}
80
81
]
81
82
82
83
CLASSIFIERS = [
@@ -111,8 +112,21 @@ if python_implementation == "PyPy":
111
112
{%- endmacro %}
112
113
INSTALL_REQUIRES = [
113
114
{% for dependency in dependencies: %}
114
- {% if ';' not in dependency: %}
115
+ {% if ';' not in dependency and not dependency.startswith('#'): %}
116
+ {% if '#egg=' in dependency: %}
117
+ {% set dependency = dependency.split('#egg=') %}
118
+ {% set repo_link, egg_name = dependency[0], dependency[1] %}
119
+ {% set repo_link = repo_link.strip() %}
120
+ {% if '#' in egg_name: %}
121
+ {% set egg_name = egg_name.split('#')[0].strip() %}
122
+ {% endif %}
123
+ '{{[repo_link, egg_name] | join('#egg=')}}',
124
+ {% elif '#' in dependency: %}
125
+ {% set dependency = dependency.split('#')[0].strip() %}
126
+ '{{dependency}}',
127
+ {% else %}
115
128
'{{dependency}}',
129
+ {% endif %}
116
130
{% endif %}
117
131
{% endfor %}
118
132
]
0 commit comments