From de5f2f80fe54194663eef3c9cdd709efd91576ec Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 8 Sep 2017 12:47:16 +0800 Subject: re: #1120 / PEP527: no longer provide .exe files for Windows --- scripts/internal/winmake.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'scripts/internal/winmake.py') diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index 138a0b0c..c2ee2ab0 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -204,13 +204,6 @@ def build(): sh('%s -c "import psutil"' % PYTHON) -@cmd -def build_exe(): - """Create exe file.""" - build() - sh("%s setup.py bdist_wininst" % PYTHON) - - @cmd def build_wheel(): """Create wheel file.""" -- cgit v1.2.1 From 5444c5b548650d6c3550fca2cfb324109b8fa4aa Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 20 Oct 2017 10:03:53 +0200 Subject: automatically set PSUTIL_TEST env var during tests --- scripts/internal/winmake.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'scripts/internal/winmake.py') diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index c2ee2ab0..185db7ee 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -328,7 +328,6 @@ def flake8(): def test(): """Run tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa %s" % (PYTHON, TSCRIPT)) @@ -337,7 +336,6 @@ def coverage(): """Run coverage tests.""" # Note: coverage options are controlled by .coveragerc file install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m coverage run %s" % (PYTHON, TSCRIPT)) sh("%s -m coverage report" % PYTHON) sh("%s -m coverage html" % PYTHON) @@ -348,7 +346,6 @@ def coverage(): def test_process(): """Run process tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_process" % PYTHON) @@ -356,7 +353,6 @@ def test_process(): def test_system(): """Run system tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_system" % PYTHON) @@ -364,7 +360,6 @@ def test_system(): def test_platform(): """Run windows only tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_windows" % PYTHON) @@ -372,7 +367,6 @@ def test_platform(): def test_misc(): """Run misc tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_misc" % PYTHON) @@ -380,7 +374,6 @@ def test_misc(): def test_unicode(): """Run unicode tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_unicode" % PYTHON) @@ -388,7 +381,6 @@ def test_unicode(): def test_connections(): """Run connections tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_connections" % PYTHON) @@ -396,7 +388,6 @@ def test_connections(): def test_contracts(): """Run contracts tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_contracts" % PYTHON) @@ -409,7 +400,6 @@ def test_by_name(): except IndexError: sys.exit('second arg missing') install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v %s" % (PYTHON, name)) @@ -422,7 +412,6 @@ def test_script(): except IndexError: sys.exit('second arg missing') install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa %s" % (PYTHON, name)) @@ -430,7 +419,6 @@ def test_script(): def test_memleaks(): """Run memory leaks tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa psutil\\tests\\test_memory_leaks.py" % PYTHON) -- cgit v1.2.1 From 88740189e0d846df8163fd172f4b4e34f7981e22 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 20 Oct 2017 12:41:10 +0200 Subject: pep8 --- scripts/internal/winmake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/internal/winmake.py') diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index 185db7ee..5b2bea98 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -321,7 +321,7 @@ def flake8(): py_files = py_files.decode() py_files = [x for x in py_files.split() if x.endswith('.py')] py_files = ' '.join(py_files) - sh("%s -Wa -m flake8 %s" % (PYTHON, py_files), nolog=True) + sh("%s -m flake8 %s" % (PYTHON, py_files), nolog=True) @cmd -- cgit v1.2.1 From 810498c36895e03a1b4e947659a2b30d8188557b Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Wed, 8 Nov 2017 14:15:15 +0100 Subject: #1053: drop python 3.3 support --- scripts/internal/winmake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/internal/winmake.py') diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index 5b2bea98..a09e2896 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -448,8 +448,8 @@ def set_python(s): # try to look for a python installation orig = s s = s.replace('.', '') - vers = ('26', '27', '33', '34', '35', '36', '37', - '26-64', '27-64', '33-64', '34-64', '35-64', '36-64', '37-64') + vers = ('26', '27', '34', '35', '36', '37', + '26-64', '27-64', '34-64', '35-64', '36-64', '37-64') for v in vers: if s == v: path = 'C:\\python%s\python.exe' % s -- cgit v1.2.1 From 083f711e577764a7de82394469aa790a20ca058a Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 12 Nov 2017 04:27:21 +0100 Subject: refactor winmake.py --- scripts/internal/winmake.py | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'scripts/internal/winmake.py') diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index a09e2896..35ce059c 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -174,6 +174,11 @@ def recursive_rm(*patterns): safe_rmtree(os.path.join(root, dir)) +def test_setup(): + os.environ['PYTHONWARNINGS'] = 'all' + os.environ['PSUTIL_TESTING'] = '1' + + # =================================================================== # commands # =================================================================== @@ -328,7 +333,8 @@ def flake8(): def test(): """Run tests""" install() - sh("%s -Wa %s" % (PYTHON, TSCRIPT)) + test_setup() + sh("%s %s" % (PYTHON, TSCRIPT)) @cmd @@ -336,7 +342,8 @@ def coverage(): """Run coverage tests.""" # Note: coverage options are controlled by .coveragerc file install() - sh("%s -Wa -m coverage run %s" % (PYTHON, TSCRIPT)) + test_setup() + sh("%s -m coverage run %s" % (PYTHON, TSCRIPT)) sh("%s -m coverage report" % PYTHON) sh("%s -m coverage html" % PYTHON) sh("%s -m webbrowser -t htmlcov/index.html" % PYTHON) @@ -346,49 +353,56 @@ def coverage(): def test_process(): """Run process tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_process" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_process" % PYTHON) @cmd def test_system(): """Run system tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_system" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_system" % PYTHON) @cmd def test_platform(): """Run windows only tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_windows" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_windows" % PYTHON) @cmd def test_misc(): """Run misc tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_misc" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_misc" % PYTHON) @cmd def test_unicode(): """Run unicode tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_unicode" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_unicode" % PYTHON) @cmd def test_connections(): """Run connections tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_connections" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_connections" % PYTHON) @cmd def test_contracts(): """Run contracts tests""" install() - sh("%s -Wa -m unittest -v psutil.tests.test_contracts" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_contracts" % PYTHON) @cmd @@ -400,7 +414,8 @@ def test_by_name(): except IndexError: sys.exit('second arg missing') install() - sh("%s -Wa -m unittest -v %s" % (PYTHON, name)) + test_setup() + sh("%s -m unittest -v %s" % (PYTHON, name)) @cmd @@ -412,14 +427,16 @@ def test_script(): except IndexError: sys.exit('second arg missing') install() - sh("%s -Wa %s" % (PYTHON, name)) + test_setup() + sh("%s %s" % (PYTHON, name)) @cmd def test_memleaks(): """Run memory leaks tests""" install() - sh("%s -Wa psutil\\tests\\test_memory_leaks.py" % PYTHON) + test_setup() + sh("%s psutil\\tests\\test_memory_leaks.py" % PYTHON) @cmd -- cgit v1.2.1 From 26c77800591a09718064d3bcea4b04c9a8544dd1 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Tue, 14 Nov 2017 23:35:19 +0100 Subject: 1173 debug mode (#1176) * implement PSUTIL_DEBUG from C module * update doc * add psutil_debug() utility function * update doc * enable PSUTIL_DEBUG for tests * update appveyor.yml * change psutil_debug() signature so that it can accept variable num of args * provide DEBUG info in psutil_raise_for_pid() * properly print debug message * do not print too much --- scripts/internal/winmake.py | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/internal/winmake.py') diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index 35ce059c..548f7a8e 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -177,6 +177,7 @@ def recursive_rm(*patterns): def test_setup(): os.environ['PYTHONWARNINGS'] = 'all' os.environ['PSUTIL_TESTING'] = '1' + os.environ['PSUTIL_DEBUG'] = '1' # =================================================================== -- cgit v1.2.1