A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

setup.py 3.5 KiB

12 anos atrás
12 anos atrás
12 anos atrás
12 anos atrás
12 anos atrás
12 anos atrás
12 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #! /usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright (C) 2009-2021 Ben Kurtovic <ben.kurtovic@gmail.com>
  5. #
  6. # Permission is hereby granted, free of charge, to any person obtaining a copy
  7. # of this software and associated documentation files (the "Software"), to deal
  8. # in the Software without restriction, including without limitation the rights
  9. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. # copies of the Software, and to permit persons to whom the Software is
  11. # furnished to do so, subject to the following conditions:
  12. #
  13. # The above copyright notice and this permission notice shall be included in
  14. # all copies or substantial portions of the Software.
  15. #
  16. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  22. # SOFTWARE.
  23. from setuptools import setup, find_packages
  24. from earwigbot import __version__
  25. required_deps = [
  26. "PyYAML >= 5.4.1", # Parsing config files
  27. "mwparserfromhell >= 0.6", # Parsing wikicode for manipulation
  28. "requests >= 2.25.1", # Wiki API requests
  29. "requests_oauthlib >= 1.3.0", # API authentication via OAuth
  30. ]
  31. extra_deps = {
  32. "crypto": [
  33. "cryptography >= 3.4.7", # Storing bot passwords + keys in the config file
  34. ],
  35. "sql": [
  36. "oursql3 >= 0.9.4", # Interfacing with MediaWiki databases
  37. ],
  38. "copyvios": [
  39. "beautifulsoup4 >= 4.9.3", # Parsing/scraping HTML
  40. "cchardet >= 2.1.7", # Encoding detection for BeautifulSoup
  41. "lxml >= 4.6.3", # Faster parser for BeautifulSoup
  42. "nltk >= 3.6.1", # Parsing sentences to split article content
  43. "pdfminer >= 20191125", # Extracting text from PDF files
  44. "tldextract >= 3.1.0", # Getting domains for the multithreaded workers
  45. "duckduckgo-search == 2.8.5", # DuckDuckGo search engine
  46. ],
  47. "time": [
  48. "pytz >= 2021.1", # Handling timezones for the !time IRC command
  49. ],
  50. }
  51. dependencies = required_deps + sum(extra_deps.values(), [])
  52. with open("README.rst") as fp:
  53. long_docs = fp.read()
  54. setup(
  55. name = "earwigbot",
  56. packages = find_packages(exclude=("tests",)),
  57. entry_points = {"console_scripts": ["earwigbot = earwigbot.util:main"]},
  58. install_requires = dependencies,
  59. test_suite = "tests",
  60. version = __version__,
  61. author = "Ben Kurtovic",
  62. author_email = "ben.kurtovic@gmail.com",
  63. url = "https://github.com/earwig/earwigbot",
  64. description = "EarwigBot is a Python robot that edits Wikipedia and interacts with people over IRC.",
  65. long_description = long_docs,
  66. download_url = "https://github.com/earwig/earwigbot/tarball/v{0}".format(__version__),
  67. keywords = "earwig earwigbot irc wikipedia wiki mediawiki",
  68. license = "MIT License",
  69. classifiers = [
  70. "Development Status :: 3 - Alpha",
  71. "Environment :: Console",
  72. "Intended Audience :: Developers",
  73. "License :: OSI Approved :: MIT License",
  74. "Natural Language :: English",
  75. "Operating System :: OS Independent",
  76. "Programming Language :: Python :: 3",
  77. "Topic :: Communications :: Chat :: Internet Relay Chat",
  78. "Topic :: Internet :: WWW/HTTP"
  79. ],
  80. )