setup.py 1.9 KB

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