diff options
-rw-r--r-- | MANIFEST.in | 12 | ||||
-rw-r--r-- | psutil/_psutil_windows.c | 6 | ||||
-rw-r--r-- | psutil/arch/windows/proc.c | 13 | ||||
-rw-r--r-- | psutil/arch/windows/proc_handles.c (renamed from psutil/arch/windows/process_handles.c) | 2 | ||||
-rw-r--r-- | psutil/arch/windows/proc_handles.h (renamed from psutil/arch/windows/process_handles.h) | 0 | ||||
-rw-r--r-- | psutil/arch/windows/proc_info.c (renamed from psutil/arch/windows/process_info.c) | 4 | ||||
-rw-r--r-- | psutil/arch/windows/proc_info.h (renamed from psutil/arch/windows/process_info.h) | 0 | ||||
-rw-r--r-- | psutil/arch/windows/proc_utils.c (renamed from psutil/arch/windows/process_utils.c) | 2 | ||||
-rw-r--r-- | psutil/arch/windows/proc_utils.h (renamed from psutil/arch/windows/process_utils.h) | 0 | ||||
-rw-r--r-- | psutil/arch/windows/socks.c | 2 | ||||
-rwxr-xr-x | scripts/internal/generate_manifest.py | 8 | ||||
-rwxr-xr-x | scripts/internal/winmake.py | 9 | ||||
-rwxr-xr-x | setup.py | 7 |
13 files changed, 43 insertions, 22 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index d6f45fb2..5d97acac 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -110,12 +110,12 @@ include psutil/arch/windows/net.h include psutil/arch/windows/ntextapi.h include psutil/arch/windows/proc.c include psutil/arch/windows/proc.h -include psutil/arch/windows/process_handles.c -include psutil/arch/windows/process_handles.h -include psutil/arch/windows/process_info.c -include psutil/arch/windows/process_info.h -include psutil/arch/windows/process_utils.c -include psutil/arch/windows/process_utils.h +include psutil/arch/windows/proc_handles.c +include psutil/arch/windows/proc_handles.h +include psutil/arch/windows/proc_info.c +include psutil/arch/windows/proc_info.h +include psutil/arch/windows/proc_utils.c +include psutil/arch/windows/proc_utils.h include psutil/arch/windows/security.c include psutil/arch/windows/security.h include psutil/arch/windows/sensors.c diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index 272e39a8..54678f75 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -23,9 +23,9 @@ #include "arch/windows/mem.h" #include "arch/windows/net.h" #include "arch/windows/proc.h" -#include "arch/windows/process_handles.h" -#include "arch/windows/process_info.h" -#include "arch/windows/process_utils.h" +#include "arch/windows/proc_handles.h" +#include "arch/windows/proc_info.h" +#include "arch/windows/proc_utils.h" #include "arch/windows/security.h" #include "arch/windows/sensors.h" #include "arch/windows/services.h" diff --git a/psutil/arch/windows/proc.c b/psutil/arch/windows/proc.c index fb5f7bb9..d9b69744 100644 --- a/psutil/arch/windows/proc.c +++ b/psutil/arch/windows/proc.c @@ -4,6 +4,13 @@ * found in the LICENSE file. */ +/* + * Process related functions. Original code was moved in here from + * psutil/_psutil_windows.c in 2023. For reference, here's the GIT blame + * history before the move: + * https://github.com/giampaolo/psutil/blame/59504a5/psutil/_psutil_windows.c +*/ + // Fixes clash between winsock2.h and windows.h #define WIN32_LEAN_AND_MEAN @@ -18,9 +25,9 @@ #include "../../_psutil_common.h" #include "proc.h" -#include "process_info.h" -#include "process_handles.h" -#include "process_utils.h" +#include "proc_info.h" +#include "proc_handles.h" +#include "proc_utils.h" // Raised by Process.wait(). diff --git a/psutil/arch/windows/process_handles.c b/psutil/arch/windows/proc_handles.c index 72e3f4d4..30e7cd2d 100644 --- a/psutil/arch/windows/process_handles.c +++ b/psutil/arch/windows/proc_handles.c @@ -23,7 +23,7 @@ #include <Python.h> #include "../../_psutil_common.h" -#include "process_utils.h" +#include "proc_utils.h" #define THREAD_TIMEOUT 100 // ms diff --git a/psutil/arch/windows/process_handles.h b/psutil/arch/windows/proc_handles.h index d1be3152..d1be3152 100644 --- a/psutil/arch/windows/process_handles.h +++ b/psutil/arch/windows/proc_handles.h diff --git a/psutil/arch/windows/process_info.c b/psutil/arch/windows/proc_info.c index 7a227d4d..5d16b813 100644 --- a/psutil/arch/windows/process_info.c +++ b/psutil/arch/windows/proc_info.c @@ -11,8 +11,8 @@ #include <windows.h> #include "../../_psutil_common.h" -#include "process_info.h" -#include "process_utils.h" +#include "proc_info.h" +#include "proc_utils.h" #ifndef _WIN64 diff --git a/psutil/arch/windows/process_info.h b/psutil/arch/windows/proc_info.h index b7795451..b7795451 100644 --- a/psutil/arch/windows/process_info.h +++ b/psutil/arch/windows/proc_info.h diff --git a/psutil/arch/windows/process_utils.c b/psutil/arch/windows/proc_utils.c index f9d4bbc8..dac1129c 100644 --- a/psutil/arch/windows/process_utils.c +++ b/psutil/arch/windows/proc_utils.c @@ -11,7 +11,7 @@ #include <Psapi.h> // EnumProcesses #include "../../_psutil_common.h" -#include "process_utils.h" +#include "proc_utils.h" DWORD * diff --git a/psutil/arch/windows/process_utils.h b/psutil/arch/windows/proc_utils.h index dca7c991..dca7c991 100644 --- a/psutil/arch/windows/process_utils.h +++ b/psutil/arch/windows/proc_utils.h diff --git a/psutil/arch/windows/socks.c b/psutil/arch/windows/socks.c index 5e4c2df8..0dc77f2d 100644 --- a/psutil/arch/windows/socks.c +++ b/psutil/arch/windows/socks.c @@ -12,7 +12,7 @@ #include <ws2tcpip.h> #include "../../_psutil_common.h" -#include "process_utils.h" +#include "proc_utils.h" #define BYTESWAP_USHORT(x) ((((USHORT)(x) << 8) | ((USHORT)(x) >> 8)) & 0xffff) diff --git a/scripts/internal/generate_manifest.py b/scripts/internal/generate_manifest.py index a1ed6b38..3d3e83b0 100755 --- a/scripts/internal/generate_manifest.py +++ b/scripts/internal/generate_manifest.py @@ -23,12 +23,16 @@ def sh(cmd): def main(): - files = sh("git ls-files").split('\n') - for file in files: + files = [] + for file in sh("git ls-files").split('\n'): if file.startswith(SKIP_PREFIXES) or \ os.path.splitext(file)[1].lower() in SKIP_EXTS or \ file in SKIP_FILES: continue + if file not in files: + files.append(file) + + for file in files: print("include " + file) diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index 16de3908..f92b2a89 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -515,6 +515,14 @@ def download_appveyor_wheels(): "--user giampaolo --project psutil" % PYTHON) +def generate_manifest(): + """Generate MANIFEST.in file.""" + script = "scripts\\internal\\generate_manifest.py" + out = subprocess.check_output([PYTHON, script], text=True) + with open("MANIFEST.in", "w", newline="\n") as f: + f.write(out) + + def get_python(path): if not path: return sys.executable @@ -560,6 +568,7 @@ def parse_args(): sp.add_parser('clean', help="deletes dev files") sp.add_parser('coverage', help="run coverage tests.") sp.add_parser('download-appveyor-wheels', help="download wheels.") + sp.add_parser('generate-manifest', help="generate MANIFEST.in file") sp.add_parser('help', help="print this help") sp.add_parser('install', help="build + install in develop/edit mode") sp.add_parser('install-git-hooks', help="install GIT pre-commit hook") @@ -214,9 +214,10 @@ if WINDOWS: 'psutil/arch/windows/disk.c', 'psutil/arch/windows/mem.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/proc.c', + 'psutil/arch/windows/proc_handles.c', + 'psutil/arch/windows/proc_info.c', + 'psutil/arch/windows/proc_utils.c', 'psutil/arch/windows/security.c', 'psutil/arch/windows/sensors.c', 'psutil/arch/windows/services.c', |