summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Jie Lin <livibetter@gmail.com>2014-07-03 09:54:52 +0800
committerYu-Jie Lin <livibetter@gmail.com>2014-07-03 09:54:52 +0800
commitadd5fec953b16cbd0839527f175c940adcea9568 (patch)
tree1099c240cdfb49ec190fba25ebc408f297659db8
parent3867993456c9112cda49ed08bd57efae697070e4 (diff)
downloadsmartypants-git-add5fec953b16cbd0839527f175c940adcea9568.tar.gz
fix #4 requirement of Wheel package, now optional
-rw-r--r--Makefile1
-rwxr-xr-xsetup.py10
2 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1e366a0..ff41868 100644
--- a/Makefile
+++ b/Makefile
@@ -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`";\
diff --git a/setup.py b/setup.py
index f623886..3347249 100755
--- a/setup.py
+++ b/setup.py
@@ -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: