1
1
#!/usr/bin/env python
2
2
3
3
import sys
4
- import logging
5
4
6
5
from setuptools import setup , find_packages
7
6
from setuptools .command .test import test as TestCommand
8
- import pkg_resources
9
7
10
8
long_description = open ('README.rst' , 'r' ).read ()
11
9
@@ -24,29 +22,14 @@ def run_tests(self):
24
22
sys .exit (errno )
25
23
26
24
27
- install_requires = ['PyYAML' , 'wrapt' , 'six>=1.5' ]
28
-
29
-
30
- extras_require = {
31
- ':python_version in "2.7"' : ['contextlib2' , 'mock' ],
32
- ':python_version in "3.4, 3.5, 3.6"' : ['yarl' ],
33
- }
34
-
35
-
36
- try :
37
- if 'bdist_wheel' not in sys .argv :
38
- for key , value in extras_require .items ():
39
- if key .startswith (':' ) and pkg_resources .evaluate_marker (key [1 :]):
40
- install_requires .extend (value )
41
- except Exception :
42
- logging .getLogger (__name__ ).exception (
43
- 'Something went wrong calculating platform specific dependencies, so '
44
- "you're getting them all!"
45
- )
46
- for key , value in extras_require .items ():
47
- if key .startswith (':' ):
48
- install_requires .extend (value )
49
-
25
+ install_requires = [
26
+ 'PyYAML' ,
27
+ 'wrapt' ,
28
+ 'six>=1.5' ,
29
+ 'contextlib2; python_version=="2.7"' ,
30
+ 'mock; python_version=="2.7"' ,
31
+ 'yarl; python_version>="3.4"' ,
32
+ ]
50
33
51
34
excluded_packages = ["tests*" ]
52
35
if sys .version_info [0 ] == 2 :
@@ -66,7 +49,6 @@ def run_tests(self):
66
49
packages = find_packages (exclude = excluded_packages ),
67
50
python_requires = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' ,
68
51
install_requires = install_requires ,
69
- extras_require = extras_require ,
70
52
license = 'MIT' ,
71
53
tests_require = ['pytest' , 'mock' , 'pytest-httpbin' ],
72
54
classifiers = [
0 commit comments