@@ -34,7 +34,7 @@ def run_tests(self):
3434 match = re .search (version_regex , text )
3535
3636 if match :
37- version = match .group (1 )
37+ __version__ = match .group (1 )
3838 else :
3939 raise RuntimeError ("No version number found!" )
4040
@@ -44,59 +44,5 @@ def run_tests(self):
4444 sys .exit ()
4545
4646
47- packages = [
48- 'hyper' ,
49- 'hyper.http20' ,
50- 'hyper.common' ,
51- 'hyper.http11' ,
52- ]
53-
54- setup (
55- name = 'hyper' ,
56- version = version ,
57- description = 'HTTP/2 Client for Python' ,
58- long_description = open ('README.rst' ).read () + '\n \n ' + open ('HISTORY.rst' ).read (),
59- author = 'Cory Benfield' ,
60- author_email = 'cory@lukasa.co.uk' ,
61- url = 'http://hyper.rtfd.org' ,
62- packages = packages ,
63- package_data = {'' : ['LICENSE' , 'README.rst' , 'CONTRIBUTORS.rst' , 'HISTORY.rst' , 'NOTICES' ]},
64- package_dir = {'hyper' : 'hyper' },
65- include_package_data = True ,
66- license = 'MIT License' ,
67- classifiers = [
68- 'Development Status :: 3 - Alpha' ,
69- 'Intended Audience :: Developers' ,
70- 'License :: OSI Approved :: MIT License' ,
71- 'Programming Language :: Python' ,
72- 'Programming Language :: Python :: 2' ,
73- 'Programming Language :: Python :: 2.7' ,
74- 'Programming Language :: Python :: 3' ,
75- 'Programming Language :: Python :: 3.4' ,
76- 'Programming Language :: Python :: 3.5' ,
77- 'Programming Language :: Python :: Implementation :: CPython' ,
78- ],
79- install_requires = [
80- 'h2>=2.4,<3.0,!=2.5.0' , 'hyperframe>=3.2,<4.0' , 'rfc3986>=1.1.0,<2.0' , 'brotlipy>=0.7.0,<1.0'
81- ],
82- tests_require = ['pytest' , 'requests' , 'mock' ],
83- cmdclass = {'test' : PyTest },
84- entry_points = {
85- 'console_scripts' : [
86- 'hyper = hyper.cli:main' ,
87- ],
88- },
89- extras_require = {
90- 'fast' : ['pycohttpparser' ],
91- # Fallback to good SSL on bad Python versions.
92- ':python_full_version < "2.7.9"' : [
93- 'pyOpenSSL>=0.15' , 'service_identity>=14.0.0'
94- ],
95- # PyPy with bad SSL modules will likely also need the cryptography
96- # module at lower than 1.0, because it doesn't support CFFI v1.0 yet.
97- ':platform_python_implementation == "PyPy" and python_full_version < "2.7.9"' : [
98- 'cryptography<1.0'
99- ],
100- ':python_version == "2.7" or python_version == "3.3"' : ['enum34>=1.0.4, <2' ]
101- }
102- )
47+ if __name__ == "__main__" :
48+ setup (cmdclass = {'test' : PyTest })
0 commit comments