setup.py 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. import json
  2. import setuptools
  3. from pathlib import Path
  4. PKG_NAME = "archivebox"
  5. DESCRIPTION = "The self-hosted internet archive."
  6. LICENSE = "MIT"
  7. AUTHOR = "Nick Sweeting"
  8. AUTHOR_EMAIL="[email protected]"
  9. REPO_URL = "https://github.com/ArchiveBox/ArchiveBox"
  10. PROJECT_URLS = {
  11. "Source": f"{REPO_URL}",
  12. "Documentation": f"{REPO_URL}/wiki",
  13. "Bug Tracker": f"{REPO_URL}/issues",
  14. "Changelog": f"{REPO_URL}/wiki/Changelog",
  15. "Roadmap": f"{REPO_URL}/wiki/Roadmap",
  16. "Community": f"{REPO_URL}/wiki/Web-Archiving-Community",
  17. "Donate": f"{REPO_URL}/wiki/Donations",
  18. }
  19. ROOT_DIR = Path(__file__).parent.resolve()
  20. PACKAGE_DIR = ROOT_DIR / PKG_NAME
  21. README = (PACKAGE_DIR / "README.md").read_text()
  22. VERSION = json.loads((PACKAGE_DIR / "package.json").read_text().strip())['version']
  23. # To see when setup.py gets called (uncomment for debugging):
  24. # import sys
  25. # print(PACKAGE_DIR, f" (v{VERSION})")
  26. # print('>', sys.executable, *sys.argv)
  27. setuptools.setup(
  28. name=PKG_NAME,
  29. version=VERSION,
  30. license=LICENSE,
  31. author=AUTHOR,
  32. author_email=AUTHOR_EMAIL,
  33. description=DESCRIPTION,
  34. long_description=README,
  35. long_description_content_type="text/markdown",
  36. url=REPO_URL,
  37. project_urls=PROJECT_URLS,
  38. python_requires=">=3.7",
  39. setup_requires=[
  40. "wheel",
  41. ],
  42. install_requires=[
  43. "requests==2.24.0",
  44. "atomicwrites==1.4.0",
  45. "mypy-extensions==0.4.3",
  46. "base32-crockford==0.3.0",
  47. "django==3.0.8",
  48. "django-extensions==3.0.3",
  49. "dateparser",
  50. "ipython",
  51. "youtube-dl",
  52. "python-crontab==2.5.1",
  53. "croniter==0.3.34",
  54. "w3lib==1.22.0",
  55. # Some/all of these will likely be added in the future:
  56. # wpull
  57. # pywb
  58. # pyppeteer
  59. # archivenow
  60. ],
  61. extras_require={
  62. 'dev': [
  63. "setuptools",
  64. "twine",
  65. "flake8",
  66. "ipdb",
  67. "mypy",
  68. "django-stubs",
  69. "sphinx",
  70. "sphinx-rtd-theme",
  71. "recommonmark",
  72. "pytest",
  73. "bottle",
  74. ],
  75. # 'redis': ['redis', 'django-redis'],
  76. # 'pywb': ['pywb', 'redis'],
  77. },
  78. packages=[PKG_NAME],
  79. include_package_data=True, # see MANIFEST.in
  80. entry_points={
  81. "console_scripts": [
  82. f"{PKG_NAME} = {PKG_NAME}.cli:main",
  83. ],
  84. },
  85. classifiers=[
  86. "License :: OSI Approved :: MIT License",
  87. "Natural Language :: English",
  88. "Operating System :: OS Independent",
  89. "Development Status :: 4 - Beta",
  90. "Topic :: Utilities",
  91. "Topic :: System :: Archiving",
  92. "Topic :: System :: Archiving :: Backup",
  93. "Topic :: System :: Recovery Tools",
  94. "Topic :: Sociology :: History",
  95. "Topic :: Internet :: WWW/HTTP",
  96. "Topic :: Internet :: WWW/HTTP :: Indexing/Search",
  97. "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
  98. "Topic :: Software Development :: Libraries :: Python Modules",
  99. "Intended Audience :: Developers",
  100. "Intended Audience :: Education",
  101. "Intended Audience :: End Users/Desktop",
  102. "Intended Audience :: Information Technology",
  103. "Intended Audience :: Legal Industry",
  104. "Intended Audience :: System Administrators",
  105. "Environment :: Console",
  106. "Environment :: Web Environment",
  107. "Programming Language :: Python :: 3",
  108. "Programming Language :: Python :: 3.7",
  109. "Programming Language :: Python :: 3.8",
  110. "Framework :: Django",
  111. "Typing :: Typed",
  112. ],
  113. )