setup.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. try:
  2. from setuptools import setup, find_packages
  3. except ImportError:
  4. from ez_setup import use_setuptools
  5. use_setuptools()
  6. from setuptools import setup, find_packages
  7. _long_description = '''
  8. This is a HTTPS client implementation for httplib and urllib2 based on
  9. PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the
  10. default provided with Python and importantly enables full verification of the
  11. SSL peer.
  12. Releases
  13. ========
  14. 0.3.0
  15. -----
  16. * Added ndg.httpsclient.utils.fetch_stream_from_url function and added
  17. parameter for data to post in open_url and fetch_* methods.
  18. * fix to ndg.httpsclient.utils module _should_use_proxy and open_url functions
  19. 0.2.0
  20. -----
  21. * added support for SSL verification with subjectAltNames using pyasn1
  22. * fixed minor bug - SSL cert DN prefix matching
  23. 0.1.0
  24. -----
  25. Initial release
  26. Prerequisites
  27. =============
  28. This has been developed and tested for Python 2.6 and 2.7 with pyOpenSSL 0.13.
  29. Note that proxy support is only available from Python 2.6.2 onwards. pyasn1 is
  30. required for correct SSL verification with subjectAltNames.
  31. Installation
  32. ============
  33. Installation can be performed using easy_install or pip.
  34. Running ndg_httpclient
  35. ======================
  36. A simple script for fetching data using HTTP or HTTPS GET from a specified URL.
  37. Parameter::
  38. url The URL of the resource to be fetched
  39. Options::
  40. -h, --help Show help message and exit.
  41. -c FILE, --certificate=FILE
  42. Certificate file - defaults to $HOME/credentials.pem
  43. -k FILE, --private-key=FILE
  44. Private key file - defaults to the certificate file
  45. -t DIR, --ca-certificate-dir=DIR
  46. Trusted CA certificate file directory.
  47. -d, --debug Print debug information - this may be useful in
  48. solving problems with HTTP or HTTPS access to a
  49. server.
  50. -p FILE, --post-data-file=FILE
  51. POST data file
  52. -f FILE, --fetch=FILE Output file
  53. -n, --no-verify-peer Skip verification of peer certificate.
  54. '''
  55. setup(
  56. name='ndg_httpsclient',
  57. version="0.3.0",
  58. description='Provides enhanced HTTPS support for httplib and urllib2 using '
  59. 'PyOpenSSL',
  60. author='Richard Wilkinson and Philip Kershaw',
  61. author_email='Philip.Kershaw@stfc.ac.uk',
  62. url='http://ndg-security.ceda.ac.uk/wiki/ndg_httpsclient/',
  63. long_description=_long_description,
  64. license='BSD - See LICENCE file for details',
  65. namespace_packages=['ndg'],
  66. packages=find_packages(),
  67. package_dir={'ndg.httpsclient': 'ndg/httpsclient'},
  68. package_data={
  69. 'ndg.httpsclient': [
  70. 'test/README',
  71. 'test/scripts/*.sh',
  72. 'test/pki/localhost.*',
  73. 'test/pki/ca/*.0'
  74. ],
  75. },
  76. install_requires = ['PyOpenSSL'],
  77. extras_require = {'subjectAltName_support': 'pyasn1'},
  78. classifiers = [
  79. 'Development Status :: 3 - Alpha',
  80. 'Environment :: Console',
  81. 'Environment :: Web Environment',
  82. 'Intended Audience :: End Users/Desktop',
  83. 'Intended Audience :: Developers',
  84. 'Intended Audience :: System Administrators',
  85. 'Intended Audience :: Science/Research',
  86. 'License :: OSI Approved :: BSD License',
  87. 'Natural Language :: English',
  88. 'Operating System :: Microsoft :: Windows',
  89. 'Operating System :: POSIX :: Linux',
  90. 'Programming Language :: Python',
  91. 'Topic :: Security',
  92. 'Topic :: Internet',
  93. 'Topic :: Scientific/Engineering',
  94. 'Topic :: System :: Distributed Computing',
  95. 'Topic :: System :: Systems Administration :: Authentication/Directory',
  96. 'Topic :: Software Development :: Libraries :: Python Modules'
  97. ],
  98. zip_safe = False,
  99. entry_points = {
  100. 'console_scripts': ['ndg_httpclient = ndg.httpsclient.utils:main',
  101. ],
  102. }
  103. )