setup.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/usr/bin/env python
  2. import os
  3. from pathlib import Path
  4. from setuptools import setup, find_packages
  5. # pylint: disable=unused-import
  6. import fastentrypoints # noqa: F401
  7. # pylint: enable=unused-import
  8. import howdoi
  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 Path(filename).is_file():
  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 :: 3",
  38. "Programming Language :: Python :: 3.5",
  39. "Programming Language :: Python :: 3.6",
  40. "Programming Language :: Python :: 3.7",
  41. "Programming Language :: Python :: 3.8",
  42. "Programming Language :: Python :: 3.9",
  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==0.1',
  65. 'appdirs',
  66. 'keep',
  67. ]
  68. )