Queer European MD passionate about IT

setup.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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='datelepot',
  28. version=find_information("version", "datelepot", "__init__.py"),
  29. author=find_information("author", "datelepot", "__init__.py"),
  30. description="telepot.aio.Bot convenient subclass, featuring dataset-powered SQLite.",
  31. license=find_information("license", "datelepot", "__init__.py"),
  32. long_description=long_description,
  33. long_description_content_type="text/markdown",
  34. url="https://bitbucket.org/davte/datelepot",
  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. 'telepot>=12.7'
  42. ],
  43. classifiers=[
  44. "Development Status :: 3 - Alpha",
  45. "Framework :: AsyncIO",
  46. "Intended Audience :: Developers",
  47. "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
  48. "Natural Language :: English",
  49. "Operating System :: OS Independent",
  50. "Programming Language :: Python :: 3 :: Only",
  51. "Topic :: Communications :: Chat",
  52. ],
  53. keywords='telepot telegram bot python wrapper',
  54. )