You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.3 KiB

  1. import setuptools
  2. from sticker.get_version import git_tag, git_revision, version, linkified_version
  3. with open("requirements.txt") as reqs:
  4. install_requires = reqs.read().splitlines()
  5. with open("optional-requirements.txt") as reqs:
  6. extras_require = {}
  7. current = []
  8. for line in reqs.read().splitlines():
  9. if line.startswith("#/"):
  10. extras_require[line[2:]] = current = []
  11. elif not line or line.startswith("#"):
  12. continue
  13. else:
  14. current.append(line)
  15. extras_require["all"] = list({dep for deps in extras_require.values() for dep in deps})
  16. try:
  17. long_desc = open("README.md").read()
  18. except IOError:
  19. long_desc = "Failed to read README.md"
  20. with open("sticker/version.py", "w") as version_file:
  21. version_file.write(f"""# Generated in setup.py
  22. git_tag = {git_tag!r}
  23. git_revision = {git_revision!r}
  24. version = {version!r}
  25. linkified_version = {linkified_version!r}
  26. """)
  27. setuptools.setup(
  28. name="maunium-stickerpicker",
  29. version=version,
  30. url="https://github.com/maunium/stickerpicker",
  31. author="Tulir Asokan",
  32. author_email="tulir@maunium.net",
  33. description="A fast and simple Matrix sticker picker widget",
  34. long_description=long_desc,
  35. long_description_content_type="text/markdown",
  36. packages=setuptools.find_packages(),
  37. install_requires=install_requires,
  38. extras_require=extras_require,
  39. python_requires="~=3.6",
  40. classifiers=[
  41. "Development Status :: 4 - Beta",
  42. "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
  43. "Framework :: AsyncIO",
  44. "Programming Language :: Python",
  45. "Programming Language :: Python :: 3",
  46. "Programming Language :: Python :: 3.6",
  47. "Programming Language :: Python :: 3.7",
  48. "Programming Language :: Python :: 3.8",
  49. "Programming Language :: Python :: 3.9",
  50. ],
  51. entry_points={"console_scripts": [
  52. "sticker-import=sticker.import:cmd",
  53. "sticker-pack=sticker.pack:cmd",
  54. "sticker-server=sticker.server:cmd",
  55. ]},
  56. package_data={"sticker.server": [
  57. "example-config.yaml",
  58. "frontend/index.html", "frontend/setup/index.html",
  59. "frontend/src/*", "frontend/lib/*/*.js", "frontend/res/*", "frontend/style/*.css",
  60. ]}
  61. )