File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import subprocess
1818import logging
1919import traceback
20- from signal import SIGKILL
21-
20+ if sys .platform == "win32" :
21+ # any value except signal.CTRL_C_EVENT and signal.CTRL_BREAK_EVENT
22+ # can be used to kill a process unconditionally in Windows
23+ SIGKILL = - 1
24+ else :
25+ from signal import SIGKILL
2226import psutil
2327
2428
Original file line number Diff line number Diff line change 1+ @ echo off
2+ python %~dpn0 %*
Original file line number Diff line number Diff line change 11import os
22import io
33import re
4+ import sys
45from setuptools import setup
56
67
@@ -39,6 +40,10 @@ def find_version(*file_paths):
3940
4041"""
4142
43+ scripts = ['mprof' ]
44+ if sys .platform == "win32" :
45+ scripts .append ('mprof.bat' )
46+
4247setup (
4348 name = 'memory_profiler' ,
4449 description = 'A module for monitoring memory usage of a python program' ,
@@ -48,7 +53,7 @@ def find_version(*file_paths):
4853 author_email = 'f@bianp.net' ,
4954 url = 'http://pypi.python.org/pypi/memory_profiler' ,
5055 py_modules = ['memory_profiler' ],
51- scripts = [ 'mprof' ] ,
56+ scripts = scripts ,
5257 install_requires = ['psutil' ],
5358 classifiers = [_f for _f in CLASSIFIERS .split ('\n ' ) if _f ],
5459 license = 'BSD'
You can’t perform that action at this time.
0 commit comments