diff options
Diffstat (limited to 'scripts/internal')
| -rwxr-xr-x | scripts/internal/download_exes.py | 6 | ||||
| -rwxr-xr-x | scripts/internal/generate_manifest.py | 8 | ||||
| -rwxr-xr-x | scripts/internal/print_announce.py | 9 | ||||
| -rwxr-xr-x | scripts/internal/winmake.py | 67 |
4 files changed, 46 insertions, 44 deletions
diff --git a/scripts/internal/download_exes.py b/scripts/internal/download_exes.py index 9688919b..1b004428 100755 --- a/scripts/internal/download_exes.py +++ b/scripts/internal/download_exes.py @@ -25,7 +25,7 @@ from psutil import __version__ as PSUTIL_VERSION BASE_URL = 'https://ci.appveyor.com/api' -PY_VERSIONS = ['2.7', '3.3', '3.4', '3.5', '3.6'] +PY_VERSIONS = ['2.7', '3.4', '3.5', '3.6'] TIMEOUT = 30 COLORS = True @@ -170,8 +170,8 @@ def main(options): completed += 1 print("downloaded %-45s %s" % ( local_fname, bytes2human(os.path.getsize(local_fname)))) - # 2 exes (32 and 64 bit) and 2 wheels (32 and 64 bit) for each ver. - expected = len(PY_VERSIONS) * 4 + # 2 wheels (32 and 64 bit) per supported python version + expected = len(PY_VERSIONS) * 2 if expected != completed: return exit("expected %s files, got %s" % (expected, completed)) if exc: diff --git a/scripts/internal/generate_manifest.py b/scripts/internal/generate_manifest.py index 8b6b4f5f..3511b749 100755 --- a/scripts/internal/generate_manifest.py +++ b/scripts/internal/generate_manifest.py @@ -12,6 +12,10 @@ import os import subprocess +IGNORED_EXTS = ('.png', '.jpg', '.jpeg') +IGNORED_FILES = ('.travis.yml', 'appveyor.yml') + + def sh(cmd): return subprocess.check_output( cmd, shell=True, universal_newlines=True).strip() @@ -21,8 +25,8 @@ def main(): files = sh("git ls-files").split('\n') for file in files: if file.startswith('.ci/') or \ - os.path.splitext(file)[1] in ('.png', '.jpg') or \ - file in ('.travis.yml', 'appveyor.yml'): + os.path.splitext(file)[1].lower() in IGNORED_EXTS or \ + file in IGNORED_FILES: continue print("include " + file) diff --git a/scripts/internal/print_announce.py b/scripts/internal/print_announce.py index e47911c2..1c2b9e11 100755 --- a/scripts/internal/print_announce.py +++ b/scripts/internal/print_announce.py @@ -19,7 +19,7 @@ HISTORY = os.path.abspath(os.path.join(HERE, '../../HISTORY.rst')) PRJ_NAME = 'psutil' PRJ_URL_HOME = 'https://github.com/giampaolo/psutil' -PRJ_URL_DOC = 'http://pythonhosted.org/psutil' +PRJ_URL_DOC = 'http://psutil.readthedocs.io' PRJ_URL_DOWNLOAD = 'https://pypi.python.org/pypi/psutil' PRJ_URL_WHATSNEW = \ 'https://github.com/giampaolo/psutil/blob/master/HISTORY.rst' @@ -39,10 +39,9 @@ monitoring, profiling and limiting process resources and management of \ running processes. It implements many functionalities offered by command \ line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, \ nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It \ -currently supports Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD and \ -NetBSD, both 32-bit and 64-bit architectures, with Python versions from 2.6 \ -to 3.5 (users of Python 2.4 and 2.5 may use 2.1.3 version). PyPy is also \ -known to work. +currently supports Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD, NetBSD \ +and AIX, both 32-bit and 64-bit architectures, with Python versions from 2.6 \ +to 3.6. PyPy is also known to work. What's new ========== diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index 138a0b0c..548f7a8e 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -174,6 +174,12 @@ def recursive_rm(*patterns): safe_rmtree(os.path.join(root, dir)) +def test_setup(): + os.environ['PYTHONWARNINGS'] = 'all' + os.environ['PSUTIL_TESTING'] = '1' + os.environ['PSUTIL_DEBUG'] = '1' + + # =================================================================== # commands # =================================================================== @@ -205,13 +211,6 @@ def build(): @cmd -def build_exe(): - """Create exe file.""" - build() - sh("%s setup.py bdist_wininst" % PYTHON) - - -@cmd def build_wheel(): """Create wheel file.""" build() @@ -328,15 +327,15 @@ 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 def test(): """Run tests""" install() - os.environ['PSUTIL_TESTING'] = '1' - sh("%s -Wa %s" % (PYTHON, TSCRIPT)) + test_setup() + sh("%s %s" % (PYTHON, TSCRIPT)) @cmd @@ -344,8 +343,8 @@ 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)) + 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) @@ -355,56 +354,56 @@ 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) + test_setup() + sh("%s -m unittest -v psutil.tests.test_process" % PYTHON) @cmd def test_system(): """Run system tests""" install() - os.environ['PSUTIL_TESTING'] = '1' - 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() - os.environ['PSUTIL_TESTING'] = '1' - 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() - os.environ['PSUTIL_TESTING'] = '1' - 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() - os.environ['PSUTIL_TESTING'] = '1' - 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() - os.environ['PSUTIL_TESTING'] = '1' - 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() - os.environ['PSUTIL_TESTING'] = '1' - sh("%s -Wa -m unittest -v psutil.tests.test_contracts" % PYTHON) + test_setup() + sh("%s -m unittest -v psutil.tests.test_contracts" % PYTHON) @cmd @@ -416,8 +415,8 @@ 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)) + test_setup() + sh("%s -m unittest -v %s" % (PYTHON, name)) @cmd @@ -429,16 +428,16 @@ def test_script(): except IndexError: sys.exit('second arg missing') install() - os.environ['PSUTIL_TESTING'] = '1' - sh("%s -Wa %s" % (PYTHON, name)) + test_setup() + sh("%s %s" % (PYTHON, name)) @cmd def test_memleaks(): """Run memory leaks tests""" install() - os.environ['PSUTIL_TESTING'] = '1' - sh("%s -Wa psutil\\tests\\test_memory_leaks.py" % PYTHON) + test_setup() + sh("%s psutil\\tests\\test_memory_leaks.py" % PYTHON) @cmd @@ -467,8 +466,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 |
