1
0

setup.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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",
  38. "Programming Language :: Python :: 2.7",
  39. "Programming Language :: Python :: 3",
  40. "Programming Language :: Python :: 3.5",
  41. "Programming Language :: Python :: 3.6",
  42. "Programming Language :: Python :: 3.7",
  43. "Programming Language :: Python :: 3.8",
  44. "Topic :: Documentation",
  45. ],
  46. keywords='howdoi help console command line answer',
  47. author='Benjamin Gleitzman',
  48. author_email='gleitz@mit.edu',
  49. maintainer='Benjamin Gleitzman',
  50. maintainer_email='gleitz@mit.edu',
  51. url='https://github.com/gleitz/howdoi',
  52. license='MIT',
  53. packages=find_packages(),
  54. entry_points={
  55. 'console_scripts': [
  56. 'howdoi = howdoi.howdoi:command_line_runner',
  57. ]
  58. },
  59. install_requires=[
  60. 'Pygments',
  61. 'cssselect',
  62. 'lxml',
  63. 'pyquery',
  64. 'requests',
  65. 'cachelib==0.1',
  66. 'appdirs',
  67. 'keep',
  68. ] + extra_dependencies(),
  69. )