setup.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import pathlib
  2. import setuptools
  3. def _read_text(path: pathlib.Path) -> str:
  4. with path.open("r") as file:
  5. return file.read()
  6. setuptools.setup(
  7. name="free-disk",
  8. use_scm_version=True,
  9. description="delete file with oldest modification date"
  10. " until a minimum of --free-bytes are available on disk",
  11. # Path.read_text() new in python v3.5
  12. long_description=_read_text(pathlib.Path(__file__).parent.joinpath("README.md")),
  13. long_description_content_type="text/markdown",
  14. author="Fabian Peter Hammerle",
  15. author_email="fabian@hammerle.me",
  16. url="https://github.com/fphammerle/free-disk",
  17. license="MIT",
  18. keywords=[
  19. "disk",
  20. "files",
  21. "cleanup",
  22. "free",
  23. "delete",
  24. "old",
  25. ],
  26. classifiers=[
  27. "Development Status :: 3 - Alpha",
  28. "Intended Audience :: System Administrators",
  29. "License :: OSI Approved :: MIT License",
  30. "Operating System :: POSIX",
  31. "Programming Language :: Python :: 3.4",
  32. "Programming Language :: Python :: 3.5",
  33. "Programming Language :: Python :: 3.6",
  34. "Programming Language :: Python :: 3.7",
  35. "Programming Language :: Python :: 3.8",
  36. "Programming Language :: Python :: 3.9",
  37. "Topic :: System :: Filesystems",
  38. "Topic :: Utilities",
  39. ],
  40. packages=setuptools.find_packages(),
  41. entry_points={
  42. "console_scripts": [
  43. "free-disk = free_disk:main",
  44. ],
  45. },
  46. install_requires=[],
  47. # workaround pipenv ignoring setuptools-scm's python version requirement
  48. # https://github.com/pypa/setuptools_scm/blob/v6.0.0/setup.cfg#L31
  49. # https://github.com/pypa/setuptools_scm/commit/a16bae72c89c8ebebdb66d91f22bc2673b919070#diff-cfca63f0fb5632710d835abfc6665a033235fd9f92a81d25cb6fad0873ffe2b6R42
  50. # https://travis-ci.org/github/fphammerle/free-disk/jobs/766438074#L237
  51. setup_requires=["setuptools_scm<6"],
  52. tests_require=["pytest"],
  53. )