@@ -15,7 +15,9 @@ from shutil import rmtree
1515{% if external_module_library %}
1616from distutils.core import setup, Extension
1717{% else %}
18- from setuptools import setup, find_packages, Command
18+
19+ from setuptools import Command, setup, find_packages
20+
1921{%endif%}
2022{%block platform_block%}
2123from platform import python_implementation
@@ -70,13 +72,12 @@ FILES = ['README.rst',{%block morefiles %}{%endblock%} 'CHANGELOG.rst']
7072{% endif %}
7173{% endif %}
7274KEYWORDS = [
75+ 'python',
7376{% for keyword in keywords %}
7477 '{{keyword}}',
7578{% endfor %}
76- {% if additional_keywords %}
77- {{ additional_keywords -}}
78- {% endif %}
79- 'python',
79+ {%block additional_keywords -%}
80+ {%endblock%}
8081]
8182
8283CLASSIFIERS = [
@@ -111,8 +112,21 @@ if python_implementation == "PyPy":
111112{%- endmacro %}
112113INSTALL_REQUIRES = [
113114{% 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 %}
115128 '{{dependency}}',
129+ {% endif %}
116130 {% endif %}
117131{% endfor %}
118132]
0 commit comments