Queer European MD passionate about IT

setup.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. email=find_information("email", "davtelepot", "__init__.py"),
  31. description="telepot.aio.Bot convenient subclass, featuring dataset-powered SQLite.",
  32. license=find_information("license", "davtelepot", "__init__.py"),
  33. long_description=long_description,
  34. long_description_content_type="text/markdown",
  35. url="https://bitbucket.org/davte/davtelepot",
  36. packages=setuptools.find_packages(),
  37. platforms=['any'],
  38. install_requires=[
  39. 'aiohttp>=3.4.4',
  40. 'bs4>=0.0.1',
  41. 'dataset>=1.1.0',
  42. 'davteutil',
  43. 'telepot>=12.7'
  44. ],
  45. classifiers=[
  46. "Development Status :: 3 - Alpha",
  47. "Framework :: AsyncIO",
  48. "Intended Audience :: Developers",
  49. "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
  50. "Natural Language :: English",
  51. "Operating System :: OS Independent",
  52. "Programming Language :: Python :: 3 :: Only",
  53. "Topic :: Communications :: Chat",
  54. ],
  55. keywords='telepot telegram bot python wrapper',
  56. )