setup.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import os
  2. import setuptools
  3. with open("README.md", "r") as fh:
  4. long_description = fh.read()
  5. script_dir = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
  6. VERSION = open(os.path.join(script_dir, 'VERSION'), 'r').read().strip()
  7. GIT_HEAD = open(os.path.join(script_dir, '.git', 'HEAD'), 'r').read().strip().split(': ')[1]
  8. GIT_SHA = open(os.path.join(script_dir, '.git', GIT_HEAD), 'r').read().strip()[:9]
  9. PYPI_VERSION = "{}+{}".format(VERSION, GIT_SHA)
  10. with open(os.path.join(script_dir, 'archivebox', 'VERSION'), 'w+') as f:
  11. f.write(PYPI_VERSION)
  12. setuptools.setup(
  13. name="archivebox",
  14. version=PYPI_VERSION,
  15. author="Nick Sweeting",
  16. author_email="[email protected]",
  17. description="The self-hosted internet archive.",
  18. long_description=long_description,
  19. long_description_content_type="text/markdown",
  20. url="https://github.com/pirate/ArchiveBox",
  21. project_urls={
  22. 'Documentation': 'https://github.com/pirate/ArchiveBox/Wiki',
  23. 'Community': 'https://github.com/pirate/ArchiveBox/wiki/Web-Archiving-Community',
  24. 'Source': 'https://github.com/pirate/ArchiveBox',
  25. 'Bug Tracker': 'https://github.com/pirate/ArchiveBox/issues',
  26. 'Roadmap': 'https://github.com/pirate/ArchiveBox/wiki/Roadmap',
  27. 'Changelog': 'https://github.com/pirate/ArchiveBox/wiki/Changelog',
  28. 'Patreon': 'https://github.com/pirate/ArchiveBox/wiki/Donations',
  29. },
  30. packages=setuptools.find_packages(),
  31. python_requires='>=3.6',
  32. install_requires=[
  33. "dataclasses==0.6",
  34. "mypy-extensions==0.4.1",
  35. "base32-crockford==0.3.0",
  36. "django==2.2",
  37. "django-extensions==2.1.6",
  38. "python-crontab==2.3.6",
  39. "youtube-dl",
  40. "ipython",
  41. # Some/all of these will likely be added in the future:
  42. # wpull
  43. # pywb
  44. # pyppeteer
  45. # archivenow
  46. # requests
  47. ],
  48. entry_points={
  49. 'console_scripts': [
  50. 'archivebox = archivebox.__main__:main',
  51. ],
  52. },
  53. package_data={
  54. 'archivebox': ['VERSION', 'templates/*', 'templates/static/*'],
  55. },
  56. classifiers=[
  57. "Programming Language :: Python :: 3",
  58. "License :: OSI Approved :: MIT License",
  59. "Operating System :: OS Independent",
  60. ],
  61. )