setup.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. 'Donations': 'https://github.com/pirate/ArchiveBox/wiki/Donations',
  29. },
  30. packages=setuptools.find_packages(),
  31. python_requires='>=3.6',
  32. install_requires=[
  33. "base32-crockford==0.3.0",
  34. "django==2.2",
  35. ],
  36. entry_points={
  37. 'console_scripts': [
  38. 'archivebox = archivebox.__main__:main',
  39. ],
  40. },
  41. package_data={
  42. 'archivebox': ['VERSION', 'templates/*', 'templates/static/*'],
  43. },
  44. classifiers=[
  45. "Programming Language :: Python :: 3",
  46. "License :: OSI Approved :: MIT License",
  47. "Operating System :: OS Independent",
  48. ],
  49. )