]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Convert extras_require conditional deps to PEP 508 form.
authorCarson Lam <carsonyylam@gmail.com>
Thu, 22 Feb 2018 05:40:02 +0000 (21:40 -0800)
committerGitHub <noreply@github.com>
Thu, 22 Feb 2018 05:40:02 +0000 (21:40 -0800)
setup.py

index d49385cb6cfb29bb628d2aa7fd772dbcb60d3853..e81749605e63db8ac83a833bef8b40658d4b5e76 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -24,29 +24,14 @@ class PyTest(TestCommand):
         sys.exit(errno)
 
 
-install_requires = ['PyYAML', 'wrapt', 'six>=1.5']
-
-
-extras_require = {
-    ':python_version in "2.7"': ['contextlib2', 'mock'],
-    ':python_version in "3.4, 3.5, 3.6"': ['yarl'],
-}
-
-
-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(':'):
-            install_requires.extend(value)
-
+install_requires = [
+    'PyYAML', 
+    'wrapt', 
+    'six>=1.5',
+    'contextlib2; python_version=="2.7"',
+    'mock; python_version=="2.7"',
+    'yarl; python_version>="3.4"',
+]
 
 excluded_packages = ["tests*"]
 if sys.version_info[0] == 2:
@@ -66,7 +51,6 @@ setup(
     packages=find_packages(exclude=excluded_packages),
     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
     install_requires=install_requires,
-    extras_require=extras_require,
     license='MIT',
     tests_require=['pytest', 'mock', 'pytest-httpbin'],
     classifiers=[