From edc3963b1e4f910d33445d084861e46856278493 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Thu, 24 Nov 2022 10:41:23 +0100 Subject: [PATCH] Require py3 for msoffcrypto Quoting the deprecation warning for encryption, which is needed for msoffcrypto: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. --- requirements.txt | 2 +- setup.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 15e409c0..72e8c505 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ pyparsing>=2.1.0,<3 olefile>=0.46 easygui colorclass -msoffcrypto-tool; platform_python_implementation!="PyPy" or (python_version>="3" and platform_system!="Windows" and platform_system!="Darwin") +msoffcrypto-tool; python_version>="3" and (platform_python_implementation!="PyPy" or platform_system!="Windows" and platform_system!="Darwin") pcodedmp>=1.2.5 \ No newline at end of file diff --git a/setup.py b/setup.py index 484b81d8..4958fc8a 100644 --- a/setup.py +++ b/setup.py @@ -325,8 +325,10 @@ def main(): "easygui", 'colorclass', # msoffcrypto-tool is not installable on PyPy+Windows (see issue #473), - # so we only require it if the platform is not Windows or not PyPy: - 'msoffcrypto-tool; platform_python_implementation!="PyPy" or (python_version>="3" and platform_system!="Windows" and platform_system!="Darwin")', + # so we only require it if the platform is not Windows or not PyPy; + # Also, usage of cryptography (used by msoffcrypt-tool) is deprecated for py2 + 'msoffcrypto-tool; (python_version>="3" and platform_python_implementation!="PyPy") \ + or (python_version>="3" and platform_system!="Windows" and platform_system!="Darwin")', 'pcodedmp>=1.2.5', ], extras_require={