pyproject.toml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. [project]
  2. name = "archivebox"
  3. version = "0.9.0rc1"
  4. requires-python = ">=3.13"
  5. description = "Self-hosted internet archiving solution."
  6. authors = [{name = "Nick Sweeting", email = "[email protected]"}]
  7. license = {text = "MIT"}
  8. readme = "README.md"
  9. keywords = ["internet archiving", "web archiving", "digipres", "warc", "preservation", "backups", "archiving", "web", "bookmarks", "puppeteer", "browser", "download"]
  10. classifiers = [
  11. "Development Status :: 4 - Beta",
  12. "Environment :: Console",
  13. "Environment :: Web Environment",
  14. "Framework :: Django",
  15. "Intended Audience :: Developers",
  16. "Intended Audience :: Education",
  17. "Intended Audience :: End Users/Desktop",
  18. "Intended Audience :: Information Technology",
  19. "Intended Audience :: Legal Industry",
  20. "Intended Audience :: System Administrators",
  21. "License :: OSI Approved :: MIT License",
  22. "Natural Language :: English",
  23. "Operating System :: OS Independent",
  24. "Programming Language :: Python :: 3",
  25. "Programming Language :: Python :: 3.13",
  26. "Programming Language :: Python :: 3.14",
  27. "Topic :: Internet :: WWW/HTTP",
  28. "Topic :: Internet :: WWW/HTTP :: Indexing/Search",
  29. "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
  30. "Topic :: Sociology :: History",
  31. "Topic :: Software Development :: Libraries :: Python Modules",
  32. "Topic :: System :: Archiving",
  33. "Topic :: System :: Archiving :: Backup",
  34. "Topic :: System :: Recovery Tools",
  35. "Topic :: Utilities",
  36. "Typing :: Typed",
  37. ]
  38. dependencies = [
  39. ### Django libraries
  40. "setuptools>=74.1.0", # for: django 5 on python >=3.12, distutils is no longer in stdlib but django 5.1 expects distutils (TODO: check if this can be removed eventually)
  41. "django>=6.0",
  42. "daphne>=4.2.0", # ASGI server for Django (no channels needed - websockets not used)
  43. "django-ninja>=1.5.1",
  44. "django-extensions>=3.2.3",
  45. "django-signal-webhooks>=0.3.0",
  46. "django-admin-data-views>=0.4.1",
  47. "django-object-actions>=4.3.0",
  48. "django-taggit==6.1.0", # TODO: remove this in favor of KVTags only
  49. ### State Management
  50. "python-statemachine>=2.3.6",
  51. ### CLI / Logging
  52. "click>=8.1.7", # for: nicer CLI command + argument definintions
  53. "rich>=13.8.0", # for: pretty CLI output
  54. "rich-click>=1.8.4", # for: pretty CLI command help text & output
  55. "ipython>=8.27.0", # for: archivebox shell (TODO: replace with bpython?)
  56. ### Host OS / System
  57. "supervisor>=4.2.5", # for: archivebox server starting daphne and workers
  58. "psutil>=6.0.0", # for: monitoring orchestractor,actors,workers,etc. and machine.models.Process
  59. "platformdirs>=4.3.6", # for: finding a xdg-config dir to store tmp/lib files in
  60. "py-machineid>=0.6.0", # for: machine/detect.py calculating unique machine guid
  61. "atomicwrites==1.4.1", # for: config file writes, index.json file writes, etc. (TODO: remove this deprecated lib in favor of archivebox.filestore.util/os.rename/os.replace)
  62. "python-crontab>=3.2.0", # for: archivebox schedule (TODO: remove this in favor of our own custom archivebox scheduler)
  63. "croniter>=3.0.3", # for: archivebox schedule (TODO: remove this in favor of our own custom archivebox scheduler)
  64. ### Base Types
  65. "pydantic>=2.8.0", # for: archivebox.api (django-ninja), archivebox.config (pydantic-settings), and archivebox.index.schema (pydantic)
  66. "pydantic-settings>=2.5.2", # for: archivebox.config
  67. "python-benedict[io,parse]>=0.33.2", # for: dict replacement all over the codebase to allow .attr-style access
  68. "base32-crockford>=0.3.0", # for: encoding UUIDs in base32
  69. ### Static Typing
  70. "mypy-extensions>=1.0.0", # for: django-stubs type hints (TODO: remove in favor of pylance/pyright?)
  71. "django-stubs>=5.0.4", # for: vscode type hints on models and common django APIs
  72. ### API clients
  73. "requests>=2.32.3", # for: fetching title, static files, headers (TODO: replace with httpx?)
  74. "sonic-client>=1.0.0",
  75. "pocket>=0.3.6", # for: importing URLs from Pocket API
  76. ### Parsers
  77. "feedparser>=6.0.11", # for: parsing pocket/pinboard/etc. RSS/bookmarks imports
  78. "dateparser>=1.2.0", # for: parsing pocket/pinboard/etc. RSS/bookmark import dates
  79. "tzdata>=2024.2", # needed for dateparser {TZ: UTC} on some systems: https://github.com/ArchiveBox/ArchiveBox/issues/1553
  80. "w3lib>=2.2.1", # used for parsing content-type encoding from http response headers & html tags
  81. ### Extractor dependencies (optional binaries detected at runtime via shutil.which)
  82. "yt-dlp>=2024.1.0", # for: media extractor
  83. ### Binary/Package Management
  84. "abx-pkg>=0.1.0", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm
  85. "gallery-dl>=1.31.1",
  86. ### UUID7 backport for Python <3.14
  87. "uuid7>=0.1.0; python_version < '3.14'", # for: uuid7 support on Python 3.13 (provides uuid_extensions module)
  88. "pytest-django>=4.11.1",
  89. ]
  90. [project.optional-dependencies]
  91. sonic = [
  92. # sonic client lib now included by default, sonic group is now a no-op:
  93. # "sonic-client>=1.0.0",
  94. # to use sonic make sure you have a sonic server running in docker (archivebox/sonic) or locally:
  95. # echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_sonic.list
  96. # curl -fsSL https://packagecloud.io/valeriansaliou/sonic/gpgkey | gpg --dearmor -o /usr/share/keyrings/valeriansaliou_sonic.gpg
  97. # apt install sonic
  98. ]
  99. ldap = [
  100. # python-ldap depends on the openldap bindings which provide no prebuilt wheels becuase they link against tons of other system packages
  101. # apt install build-essential python3-dev python3-ldap libsasl2-dev libldap2-dev libssl-dev
  102. "python-ldap>=3.4.3",
  103. "django-auth-ldap>=4.1.0",
  104. ]
  105. debug = [
  106. # packages needed for running with DEBUG=True
  107. "django-debug-toolbar>=4.4.6",
  108. "djdt_flamegraph>=0.2.13",
  109. "ipdb>=0.13.13",
  110. "requests-tracker>=0.3.3",
  111. "django-autotyping>=0.5.1",
  112. ]
  113. all = [
  114. "archivebox[sonic,ldap,debug]"
  115. ]
  116. [dependency-groups]
  117. dev = [
  118. ### BUILD
  119. "uv>=0.4.26",
  120. "pip>=24.2",
  121. "setuptools>=75.1.0",
  122. "wheel>=0.44.0",
  123. "bumpver>=2023.1129",
  124. #"homebrew-pypi-poet>=0.10.0", # for: generating archivebox.rb brewfile list of python packages
  125. ### DOCS
  126. "recommonmark>=0.7.1",
  127. "sphinx>=8.1.3",
  128. "sphinx-rtd-theme>=2.0.0",
  129. "myst-parser>=4.0.0",
  130. "sphinx-autodoc2>=0.5.0",
  131. "linkify-it-py>=2.0.3",
  132. ### DEBUGGING
  133. "django-debug-toolbar>=4.4.6",
  134. "requests-tracker>=0.3.3",
  135. "djdt_flamegraph>=0.2.13",
  136. "ipdb>=0.13.13",
  137. "logfire[django]>=0.51.0",
  138. "opentelemetry-instrumentation-django>=0.47b0",
  139. "opentelemetry-instrumentation-sqlite3>=0.47b0",
  140. "viztracer>=0.17.0", # usage: viztracer ../.venv/bin/archivebox manage check
  141. # "snakeviz", # usage: python -m cProfile -o flamegraph.prof ../.venv/bin/archivebox manage check
  142. ### TESTING
  143. "pytest>=8.3.3",
  144. "bottle>=0.13.1",
  145. ### LINTING
  146. "ruff>=0.6.6",
  147. "flake8>=7.1.1",
  148. "mypy>=1.11.2",
  149. ]
  150. [tool.uv]
  151. environments = ["sys_platform == 'darwin'", "sys_platform == 'linux'"]
  152. package = true
  153. # compile-bytecode = true
  154. [tool.uv.pip]
  155. python-version = "3.13"
  156. # compile-bytecode = true
  157. [build-system]
  158. requires = ["pdm-backend"]
  159. build-backend = "pdm.backend"
  160. # https://github.com/astral-sh/uv/issues/3957
  161. [tool.setuptools]
  162. packages = ["archivebox"]
  163. package-dir = {"archivebox" = "archivebox"}
  164. [tool.ruff]
  165. line-length = 140
  166. target-version = "py313"
  167. src = ["archivebox"]
  168. exclude = ["*.pyi", "typings/", "migrations/"]
  169. # https://docs.astral.sh/ruff/rules/
  170. [tool.ruff.lint]
  171. ignore = ["E731", "E303", "E266", "E241", "E222"]
  172. [tool.pytest.ini_options]
  173. testpaths = [ "tests" ]
  174. DJANGO_SETTINGS_MODULE = "archivebox.core.settings"
  175. [tool.mypy]
  176. mypy_path = "archivebox,archivebox/typings"
  177. namespace_packages = true
  178. explicit_package_bases = true
  179. # follow_imports = "silent"
  180. # ignore_missing_imports = true
  181. # disallow_incomplete_defs = true
  182. # disallow_untyped_defs = true
  183. # disallow_untyped_decorators = true
  184. # exclude = "tests/.*"
  185. plugins = ["mypy_django_plugin.main"]
  186. [tool.django-stubs]
  187. django_settings_module = "core.settings"
  188. [tool.pyright]
  189. include = [
  190. "archivebox",
  191. ]
  192. exclude = [
  193. ".venv",
  194. "**/*.pyi",
  195. "**/__init__.pyi",
  196. "**/node_modules",
  197. "**/__pycache__",
  198. "**/migrations",
  199. ]
  200. stubPath = "./archivebox/typings"
  201. venvPath = "."
  202. venv = ".venv"
  203. # ignore = ["src/oldstuff"]
  204. # defineConstant = { DEBUG = true }
  205. reportMissingImports = true
  206. reportMissingTypeStubs = false
  207. pythonVersion = "3.13"
  208. pythonPlatform = "Linux"
  209. [project.scripts]
  210. archivebox = "archivebox.cli:main"
  211. [project.urls]
  212. Homepage = "https://github.com/ArchiveBox/ArchiveBox"
  213. Source = "https://github.com/ArchiveBox/ArchiveBox"
  214. Documentation = "https://github.com/ArchiveBox/ArchiveBox/wiki"
  215. "Bug Tracker" = "https://github.com/ArchiveBox/ArchiveBox/issues"
  216. Changelog = "https://github.com/ArchiveBox/ArchiveBox/releases"
  217. Roadmap = "https://github.com/ArchiveBox/ArchiveBox/wiki/Roadmap"
  218. Community = "https://github.com/ArchiveBox/ArchiveBox/wiki/Web-Archiving-Community"
  219. Demo = "https://demo.archivebox.io"
  220. Donate = "https://github.com/ArchiveBox/ArchiveBox/wiki/Donations"
  221. [tool.bumpver]
  222. current_version = "v0.8.5rc53"
  223. version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]"
  224. commit_message = "bump version {old_version} -> {new_version}"
  225. tag_message = "{new_version}"
  226. tag_scope = "default"
  227. pre_commit_hook = ""
  228. post_commit_hook = ""
  229. commit = true
  230. tag = true
  231. push = true
  232. [tool.bumpver.file_patterns]
  233. "pyproject.toml" = [
  234. 'current_version = "{version}"',
  235. 'version = "{pep440_version}"',
  236. ]