aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/psutil/py2/patches/99-fix-ya.make.patch
blob: 9c9f8e6df39cd0bcf1da352dd06fd1840a27d6c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
--- contrib/python/psutil/py2/ya.make	(index)
+++ contrib/python/psutil/py2/ya.make	(working tree)
@@ -1,2 +0,0 @@
-# Generated by devtools/yamaker (pypi).
-
@@ -32,6 +29,0 @@ CFLAGS(
-    -DPSUTIL_POSIX=1
-    -DPSUTIL_LINUX=1
-    -DPSUTIL_POSIX=1
-    -DPSUTIL_OSX=1
-    -DPSUTIL_WINDOWS=1
-    -DPSUTIL_SIZEOF_PID_T=4
@@ -42,15 +33,0 @@ SRCS(
-    psutil/_psutil_linux.c
-    psutil/_psutil_osx.c
-    psutil/_psutil_posix.c
-    psutil/_psutil_windows.c
-    psutil/arch/osx/process_info.c
-    psutil/arch/windows/cpu.c
-    psutil/arch/windows/disk.c
-    psutil/arch/windows/net.c
-    psutil/arch/windows/process_handles.c
-    psutil/arch/windows/process_info.c
-    psutil/arch/windows/process_utils.c
-    psutil/arch/windows/security.c
-    psutil/arch/windows/services.c
-    psutil/arch/windows/socks.c
-    psutil/arch/windows/wmi.c
@@ -59,6 +36,71 @@ SRCS(
-PY_REGISTER(
-    psutil._psutil_linux
-    psutil._psutil_osx
-    psutil._psutil_posix
-    psutil._psutil_windows
-)
+IF (OS_LINUX)
+    CFLAGS(
+        -DPSUTIL_POSIX=1
+        -DPSUTIL_LINUX=1
+    )
+
+    SRCS(
+        psutil/_psutil_linux.c
+        psutil/_psutil_posix.c
+    )
+
+    PY_REGISTER(
+        psutil._psutil_linux
+        psutil._psutil_posix
+    )
+ENDIF()
+
+IF (OS_DARWIN)
+    CFLAGS(
+        -DPSUTIL_POSIX=1
+        -DPSUTIL_OSX=1
+    )
+
+    LDFLAGS(
+        -framework CoreFoundation
+        -framework IOKit
+    )
+
+    SRCS(
+        psutil/_psutil_osx.c
+        psutil/_psutil_posix.c
+        psutil/arch/osx/process_info.c
+    )
+
+    PY_REGISTER(
+        psutil._psutil_osx
+        psutil._psutil_posix
+    )
+ENDIF()
+
+IF (OS_WINDOWS)
+    CFLAGS(
+        -DPSUTIL_WINDOWS=1
+        -DPSUTIL_SIZEOF_PID_T=4
+    )
+
+    LDFLAGS(
+        Shell32.lib
+        PowrProf.lib
+        Wtsapi32.lib
+        Pdh.lib
+    )
+
+    SRCS(
+        psutil/_psutil_windows.c
+        psutil/arch/windows/cpu.c
+        psutil/arch/windows/disk.c
+        psutil/arch/windows/net.c
+        psutil/arch/windows/process_handles.c
+        psutil/arch/windows/process_info.c
+        psutil/arch/windows/process_utils.c
+        psutil/arch/windows/security.c
+        psutil/arch/windows/services.c
+        psutil/arch/windows/socks.c
+        psutil/arch/windows/wmi.c
+    )
+
+    PY_REGISTER(
+        psutil._psutil_windows
+    )
+ENDIF()