summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authoryanraber <devnull@localhost>2009-04-30 00:11:29 +0000
committeryanraber <devnull@localhost>2009-04-30 00:11:29 +0000
commit25e6a97a8f96953e4e340b2041bd63cb85217a46 (patch)
tree7dd9564cb80528e212287d1783b47a57b98ae4d8 /setup.py
parentb2dbbca1aa97c8f5b8838aa486c6b2f6f05a64c2 (diff)
downloadpsutil-25e6a97a8f96953e4e340b2041bd63cb85217a46.tar.gz
Reverting changes applied in r351 and r352 and roll back to r350.
We now conditionally check whether using GetSystemTime() or NtQuerySystemInformation() depending on their availability as it was in r350, but doing that only once instead of every time the funcion is called which results in a considerable speedup. This change was made also to permit us to distribute a single pre-compiled executable which works on both Windows 2000 and higher.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index af1e0c95..ce24a049 100644
--- a/setup.py
+++ b/setup.py
@@ -8,16 +8,11 @@ from distutils.core import setup, Extension
# Windows
if sys.platform.lower().startswith("win"):
-
- def get_winver():
- maj,min = sys.getwindowsversion()[0:2]
- return '0x0%s' % ((maj * 100) + min)
-
extensions = Extension('_psutil_mswindows',
sources=['psutil/_psutil_mswindows.c',
'psutil/arch/mswindows/process_info.c',
'psutil/arch/mswindows/security.c'],
- define_macros=[('_WIN32_WINNT', get_winver()), ('_AVAIL_WINVER_', get_winver())],
+ define_macros=[('_WIN32_WINNT', '0x0500')],
libraries=["psapi", "kernel32", "advapi32", "shell32"]
)
# OS X