Queer European MD passionate about IT

setup.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. classifiers=[
  38. "Development Status :: 3 - Alpha",
  39. "Framework :: AsyncIO",
  40. "Intended Audience :: Developers",
  41. "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
  42. "Natural Language :: English",
  43. "Operating System :: OS Independent",
  44. "Programming Language :: Python :: 3 :: Only",
  45. "Topic :: Communications :: Chat",
  46. ],
  47. keywords='telepot telegram bot python wrapper',
  48. )