setup.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/usr/bin/env python
  2. from setuptools import setup, find_packages
  3. import fastentrypoints
  4. import howdoi
  5. import os
  6. def extra_dependencies():
  7. import sys
  8. return ['argparse'] if sys.version_info < (2, 7) else []
  9. def read(*names):
  10. values = dict()
  11. for name in names:
  12. value = ''
  13. for extension in ('.txt', '.rst'):
  14. filename = name + extension
  15. if os.path.isfile(filename):
  16. with open(filename) as in_file:
  17. value = in_file.read()
  18. break
  19. values[name] = value
  20. return values
  21. long_description = """
  22. %(README)s
  23. News
  24. ====
  25. %(CHANGES)s
  26. """ % read('README', 'CHANGES')
  27. setup(
  28. name='howdoi',
  29. version=howdoi.__version__,
  30. description='Instant coding answers via the command line',
  31. long_description=long_description,
  32. long_description_content_type='text/x-rst',
  33. classifiers=[
  34. "Development Status :: 5 - Production/Stable",
  35. "Environment :: Console",
  36. "Intended Audience :: Developers",
  37. "Programming Language :: Python :: 2.7",
  38. "Programming Language :: Python :: 3",
  39. "Programming Language :: Python :: 3.3",
  40. "Programming Language :: Python :: 3.4",
  41. "Programming Language :: Python :: 3.5",
  42. "Programming Language :: Python :: 3.6",
  43. "Topic :: Documentation",
  44. ],
  45. keywords='howdoi help console command line answer',
  46. author='Benjamin Gleitzman',
  47. author_email='gleitz@mit.edu',
  48. maintainer='Benjamin Gleitzman',
  49. maintainer_email='gleitz@mit.edu',
  50. url='https://github.com/gleitz/howdoi',
  51. license='MIT',
  52. packages=find_packages(),
  53. entry_points={
  54. 'console_scripts': [
  55. 'howdoi = howdoi.howdoi:command_line_runner',
  56. ]
  57. },
  58. install_requires=[
  59. 'Pygments',
  60. 'cssselect',
  61. 'lxml',
  62. 'pyquery',
  63. 'requests',
  64. 'cachelib',
  65. 'appdirs',
  66. 'keep',
  67. ] + extra_dependencies(),
  68. )