Skip to content

Commit

Permalink
修复在 Python 2 下通过 pip install 安装 wheel 格式后使用出错的问题
Browse files Browse the repository at this point in the history
wheel 格式之前不会自动安装额外依赖 enum34
  • Loading branch information
mozillazg committed May 29, 2017
1 parent c22a85d commit a227b67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
requirements.append('argparse')
if sys.version_info[:2] < (3, 4):
requirements.append('enum34')
extras_require = {
':python_version<"2.7"': ['argparse'],
':python_version<"3.4"': ['enum34'],
}


def get_meta():
Expand Down Expand Up @@ -59,6 +63,7 @@ def long_description():
package_dir={'pypinyin': 'pypinyin'},
include_package_data=True,
install_requires=requirements,
extras_require=extras_require,
zip_safe=False,
entry_points={
'console_scripts': [
Expand Down

0 comments on commit a227b67

Please sign in to comment.