]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Support distribute, Fixes #178
authorThomas Grainger <tom@yplanapp.com>
Wed, 29 Jul 2015 20:32:52 +0000 (21:32 +0100)
committerThomas Grainger <tom@yplanapp.com>
Wed, 29 Jul 2015 21:19:45 +0000 (22:19 +0100)
setup.py

index 826744f7e01b4dbfa1672d011ce938802f89d9cd..d14bfd8714ea4ca16cf473dfd7e9d6aebe2d6d15 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 
 import sys
+import logging
+
 from setuptools import setup, find_packages
 from setuptools.command.test import test as TestCommand
 import pkg_resources
@@ -31,9 +33,18 @@ extras_require = {
 }
 
 
-if 'bdist_wheel' not in sys.argv:
+try:
+    if 'bdist_wheel' not in sys.argv:
+        for key, value in extras_require.items():
+            if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
+                install_requires.extend(value)
+except Exception:
+    logging.getLogger(__name__).exception(
+        'Something went wrong calculating platform specific dependencies, so '
+        "you're getting them all!"
+    )
     for key, value in extras_require.items():
-        if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
+        if key.startswith(':'):
             install_requires.extend(value)
 
 setup(