setup.py 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/usr/bin/env python
  2. from setuptools import setup
  3. import os
  4. import re
  5. import codecs
  6. base_path = os.path.dirname(__file__)
  7. # Get the version (borrowed from SQLAlchemy)
  8. with open(os.path.join(base_path, 'urllib3', '__init__.py')) as fp:
  9. VERSION = re.compile(r".*__version__ = '(.*?)'",
  10. re.S).match(fp.read()).group(1)
  11. with codecs.open('README.rst', encoding='utf-8') as fp:
  12. readme = fp.read()
  13. with codecs.open('CHANGES.rst', encoding='utf-8') as fp:
  14. changes = fp.read()
  15. version = VERSION
  16. setup(name='urllib3',
  17. version=version,
  18. description="HTTP library with thread-safe connection pooling, file post, and more.",
  19. long_description=u'\n\n'.join([readme, changes]),
  20. classifiers=[
  21. 'Environment :: Web Environment',
  22. 'Intended Audience :: Developers',
  23. 'License :: OSI Approved :: MIT License',
  24. 'Operating System :: OS Independent',
  25. 'Programming Language :: Python',
  26. 'Programming Language :: Python :: 2',
  27. 'Programming Language :: Python :: 2.6',
  28. 'Programming Language :: Python :: 2.7',
  29. 'Programming Language :: Python :: 3',
  30. 'Programming Language :: Python :: 3.3',
  31. 'Programming Language :: Python :: 3.4',
  32. 'Programming Language :: Python :: 3.5',
  33. 'Programming Language :: Python :: 3.6',
  34. 'Programming Language :: Python :: Implementation :: CPython',
  35. 'Programming Language :: Python :: Implementation :: PyPy',
  36. 'Topic :: Internet :: WWW/HTTP',
  37. 'Topic :: Software Development :: Libraries',
  38. ],
  39. keywords='urllib httplib threadsafe filepost http https ssl pooling',
  40. author='Andrey Petrov',
  41. author_email='andrey.petrov@shazow.net',
  42. url='https://urllib3.readthedocs.io/',
  43. license='MIT',
  44. packages=['urllib3',
  45. 'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
  46. 'urllib3.packages.backports', 'urllib3.contrib',
  47. 'urllib3.contrib._securetransport', 'urllib3.util',
  48. ],
  49. requires=[],
  50. tests_require=[
  51. # These are a less-specific subset of dev-requirements.txt, for the
  52. # convenience of distro package maintainers.
  53. 'pytest',
  54. 'nose',
  55. 'mock',
  56. 'tornado',
  57. ],
  58. test_suite='test',
  59. extras_require={
  60. 'secure': [
  61. 'pyOpenSSL>=0.14',
  62. 'cryptography>=1.3.4',
  63. 'idna>=2.0.0',
  64. 'certifi',
  65. "ipaddress",
  66. ],
  67. 'socks': [
  68. 'PySocks>=1.5.6,<2.0,!=1.5.7',
  69. ]
  70. },
  71. )