setup.py 839 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/python
  2. #-*- coding: utf-8 -*-
  3. import os
  4. from distutils.core import setup
  5. from distutils.command.install import install
  6. import sorg
  7. from sorg import consts
  8. class Install(install):
  9. def run(self):
  10. install.run(self)
  11. if not self.root:
  12. self.root = "/"
  13. target = os.path.join(self.root, consts.config_dir.lstrip("/"))
  14. if not os.path.exists(target):
  15. os.makedirs(target, 0o755)
  16. setup(name="sorg",
  17. version=sorg.versionString(),
  18. description="Python Modules for sorg",
  19. license="GNU GPL2",
  20. url="http://www.pardus.org.tr/",
  21. packages = ["sorg"],
  22. scripts = ["sorg-cli", "inf2mondb"],
  23. data_files = [
  24. (consts.data_dir, ["data/DriversDB", "data/MonitorsDB"]),
  25. ("/sbin", ["sorg-loadmodule"]),
  26. ],
  27. cmdclass = {"install": Install}
  28. )