ya.make 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. PY2_LIBRARY()
  2. LICENSE(BSD-3-Clause)
  3. VERSION(5.8.0)
  4. NO_UTIL()
  5. SRCDIR(contrib/python/psutil/py2/psutil)
  6. NO_COMPILER_WARNINGS()
  7. CFLAGS(
  8. -DPSUTIL_VERSION=580
  9. )
  10. IF (OS_LINUX OR OS_DARWIN)
  11. CFLAGS(
  12. -DPSUTIL_POSIX=1
  13. )
  14. SRCS(
  15. _psutil_common.c
  16. _psutil_posix.c
  17. )
  18. PY_REGISTER(psutil._psutil_posix)
  19. ENDIF ()
  20. IF (OS_LINUX)
  21. CFLAGS(
  22. -DPSUTIL_LINUX=1
  23. )
  24. SRCS(
  25. _psutil_linux.c
  26. )
  27. PY_REGISTER(psutil._psutil_linux)
  28. ENDIF ()
  29. IF (OS_DARWIN)
  30. CFLAGS(
  31. -DPSUTIL_OSX=1
  32. )
  33. EXTRALIBS("-framework CoreFoundation -framework IOKit")
  34. PEERDIR(
  35. contrib/python/psutil/py2/psutil/arch/osx
  36. )
  37. SRCS(
  38. _psutil_osx.c
  39. )
  40. PY_REGISTER(psutil._psutil_osx)
  41. ENDIF ()
  42. IF (OS_WINDOWS)
  43. CFLAGS(
  44. -DPSUTIL_WINDOWS=1
  45. -DPSUTIL_SIZEOF_PID_T=4
  46. )
  47. LDFLAGS(
  48. Shell32.lib
  49. PowrProf.lib
  50. Wtsapi32.lib
  51. Pdh.lib
  52. )
  53. SRCS(
  54. _psutil_common.c
  55. _psutil_windows.c
  56. arch/windows/cpu.c
  57. arch/windows/disk.c
  58. arch/windows/net.c
  59. arch/windows/process_handles.c
  60. arch/windows/process_info.c
  61. arch/windows/process_utils.c
  62. arch/windows/security.c
  63. arch/windows/services.c
  64. arch/windows/socks.c
  65. arch/windows/wmi.c
  66. )
  67. PY_REGISTER(psutil._psutil_windows)
  68. ENDIF ()
  69. NO_CHECK_IMPORTS(
  70. psutil._psbsd
  71. psutil._psosx
  72. psutil._pssunos
  73. psutil._psutil_bsd
  74. psutil._psutil_common
  75. psutil._psutil_osx
  76. psutil._psutil_sunos
  77. psutil._psutil_windows
  78. psutil._pswindows
  79. )
  80. PY_SRCS(
  81. TOP_LEVEL
  82. psutil/__init__.py
  83. psutil/_common.py
  84. psutil/_compat.py
  85. )
  86. IF (OS_LINUX OR OS_DARWIN)
  87. PY_SRCS(
  88. TOP_LEVEL
  89. psutil/_psposix.py
  90. )
  91. ENDIF ()
  92. IF (OS_LINUX)
  93. PY_SRCS(
  94. TOP_LEVEL
  95. psutil/_pslinux.py
  96. )
  97. ENDIF ()
  98. IF (OS_DARWIN)
  99. PY_SRCS(
  100. TOP_LEVEL
  101. psutil/_psosx.py
  102. )
  103. ENDIF ()
  104. IF (OS_WINDOWS)
  105. PY_SRCS(
  106. TOP_LEVEL
  107. psutil/_pswindows.py
  108. )
  109. ENDIF ()
  110. RESOURCE_FILES(
  111. PREFIX contrib/python/psutil/py2/
  112. .dist-info/METADATA
  113. .dist-info/top_level.txt
  114. )
  115. NO_LINT()
  116. END()
  117. RECURSE_FOR_TESTS(
  118. test
  119. )