From: Carson Lam Date: Thu, 22 Feb 2018 05:40:02 +0000 (-0800) Subject: Convert extras_require conditional deps to PEP 508 form. X-Git-Tag: v1.12.0~2^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5ba1c7fbb66a526d7b5a1f06c2377cff480ab26d;p=vcrpy.git Convert extras_require conditional deps to PEP 508 form. --- diff --git a/setup.py b/setup.py index d49385c..e817496 100644 --- 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=[