diff --git a/CHANGES.txt b/CHANGES.txt index 1e5e4807e0..337f66ab88 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,10 +14,11 @@ https://mhammond.github.io/pywin32_installers.html . Coming in build 309, as yet unreleased -------------------------------------- +* Added support for relative path for `pywin32_postinstall`'s `-destination` argument (#2454, @Avasam) * The postinstall script is now available as a console script. You can invoke it in one of two new methods: (#2408, @Avasam) 1. `python -m pywin32_postinstall -install` (recommended) 2. `pywin32_postinstall -install` (shorter but you don't have control over which python environment is used) -* Changed the implementation of 'com_record' to a subclassable Python type (2437#, #2361, @geppi) +* Changed the implementation of 'com_record' to a subclassable Python type (#2437, #2361, @geppi) * Removed param `hIcon` from `win32comext.shell.ShellExecuteEx`. It was unusable since Windows Vista (#2423, @Avasam) * Fixed `nbios.NCBStruct` packing (#2406, @Avasam) * Restored axdebug builds on Python 3.10 (#2416, @Avasam) diff --git a/win32/scripts/pywin32_postinstall.py b/win32/scripts/pywin32_postinstall.py index 295818a825..1321b99908 100644 --- a/win32/scripts/pywin32_postinstall.py +++ b/win32/scripts/pywin32_postinstall.py @@ -642,9 +642,12 @@ def uninstall(lib_dir): # Out of principle, we're still not using system exits. -def verify_destination(location): +def verify_destination(location: str) -> str: + location = os.path.abspath(location) if not os.path.isdir(location): - raise argparse.ArgumentTypeError(f'Path "{location}" does not exist!') + raise argparse.ArgumentTypeError( + f'Path "{location}" is not an existing directory!' + ) return location