Queer European MD passionate about IT

setup.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import codecs
  2. import os
  3. import re
  4. import setuptools
  5. import sys
  6. if sys.version_info < (3,5):
  7. raise RuntimeError("Python3.5+ is needed to run async code")
  8. here = os.path.abspath(os.path.dirname(__file__))
  9. def read(*parts):
  10. with codecs.open(os.path.join(here, *parts), 'r') as fp:
  11. return fp.read()
  12. def find_information(info, *file_paths):
  13. version_file = read(*file_paths)
  14. version_match = re.search(
  15. r"^__{info}__ = ['\"]([^'\"]*)['\"]".format(
  16. info=info
  17. ),
  18. version_file,
  19. re.M
  20. )
  21. if version_match:
  22. return version_match.group(1)
  23. raise RuntimeError("Unable to find version string.")
  24. with open("README.md", "r") as readme_file:
  25. long_description = readme_file.read()
  26. setuptools.setup(
  27. name='davtelepot',
  28. version=find_information("version", "davtelepot", "__init__.py"),
  29. author=find_information("author", "davtelepot", "__init__.py"),
  30. description="telepot.aio.Bot convenient subclass, featuring dataset-powered SQLite.",
  31. license=find_information("license", "davtelepot", "__init__.py"),
  32. long_description=long_description,
  33. long_description_content_type="text/markdown",
  34. url="https://bitbucket.org/davte/davtelepot",
  35. packages=setuptools.find_packages(),
  36. platforms=['any'],
  37. install_requires=[
  38. 'aiohttp>=3.4.4',
  39. 'bs4>=0.0.1',
  40. 'dataset>=1.1.0',
  41. 'davteutil',
  42. 'telepot>=12.7'
  43. ],
  44. classifiers=[
  45. "Development Status :: 3 - Alpha",
  46. "Framework :: AsyncIO",
  47. "Intended Audience :: Developers",
  48. "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
  49. "Natural Language :: English",
  50. "Operating System :: OS Independent",
  51. "Programming Language :: Python :: 3 :: Only",
  52. "Topic :: Communications :: Chat",
  53. ],
  54. keywords='telepot telegram bot python wrapper',
  55. )