diff options
author | Yu-Jie Lin <livibetter@gmail.com> | 2014-07-03 09:54:52 +0800 |
---|---|---|
committer | Yu-Jie Lin <livibetter@gmail.com> | 2014-07-03 09:54:52 +0800 |
commit | add5fec953b16cbd0839527f175c940adcea9568 (patch) | |
tree | 1099c240cdfb49ec190fba25ebc408f297659db8 | |
parent | 3867993456c9112cda49ed08bd57efae697070e4 (diff) | |
download | smartypants-git-add5fec953b16cbd0839527f175c940adcea9568.tar.gz |
fix #4 requirement of Wheel package, now optional
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | setup.py | 10 |
2 files changed, 7 insertions, 4 deletions
@@ -73,7 +73,6 @@ $(VENV_PY2_CMD) $(VENV_PY3_CMD): rm -rf $(INSTALL_TEST_DIR) $@ $(INSTALL_TEST_DIR) ./setup.py sdist --dist-dir $(INSTALL_TEST_DIR) - $(INSTALL_TEST_DIR)/bin/pip install wheel $(INSTALL_TEST_DIR)/bin/pip install $(INSTALL_TEST_DIR)/*.tar.gz @\ CHK_VER="`$(PY2_CMD) $(SCRIPT) --version 2>&1`";\ @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (C) 2013 by Yu-Jie Lin +# Copyright (C) 2013, 2014 by Yu-Jie Lin # For detail license information, See COPYING from __future__ import print_function @@ -8,7 +8,10 @@ import sys from distutils.core import Command, setup from unittest import TestLoader, TextTestRunner -from wheel.bdist_wheel import bdist_wheel +try: + from wheel.bdist_wheel import bdist_wheel +except ImportError: + bdist_wheel = None try: from sphinx.setup_command import BuildDoc @@ -284,7 +287,6 @@ setup_d = dict( name=module_name, long_description=long_description, cmdclass={ - 'bdist_wheel': bdist_wheel, 'isort': cmd_isort, 'pep8': cmd_pep8, 'pyflakes': cmd_pyflakes, @@ -297,6 +299,8 @@ setup_d = dict( **meta ) +if bdist_wheel: + setup_d['cmdclass']['bdist_wheel'] = bdist_wheel if BuildDoc: setup_d['cmdclass']['build_sphinx'] = BuildDoc if UploadDoc: |