From 6701f7c8b070b320cab7cda52963b53f54747027 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 13 Oct 2020 16:42:04 +0300 Subject: [PATCH 1/2] add new exclude --- tests/sources/python-modules.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sources/python-modules.py b/tests/sources/python-modules.py index 5dc91974..e00b66f5 100644 --- a/tests/sources/python-modules.py +++ b/tests/sources/python-modules.py @@ -255,6 +255,10 @@ def replace(lst, old, new): if sys.version_info > (3, 8): standard_library.remove('dummy_threading') +# 'symbol' module has been removed from Python 3.10 +if sys.version_info >= (3, 10): + standard_library.remove('symbol') + # Remove tkinter and Easter eggs excluded_modules = [ 'antigravity', From c4030498aa618894b0bb53d94f98ec138f1f5d5c Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 13 Oct 2020 19:56:27 +0300 Subject: [PATCH 2/2] add version compare --- tests/python-tests.ps1 | 4 +++- tests/sources/python-config-test.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/python-tests.ps1 b/tests/python-tests.ps1 index 71bb313b..d3b12ebb 100644 --- a/tests/python-tests.ps1 +++ b/tests/python-tests.ps1 @@ -7,6 +7,7 @@ param ( Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1") Import-Module (Join-Path $PSScriptRoot "../helpers/common-helpers.psm1") +Import-Module (Join-Path $PSScriptRoot "../builders/python-version.psm1") function Analyze-MissingModules([string] $buildOutputLocation) { $searchStringStart = "Failed to build these modules:" @@ -59,7 +60,8 @@ Describe "Tests" { } It "Check if python configuration is correct" { - "python ./sources/python-config-test.py $Version" | Should -ReturnZeroExitCode + $nativeVersion = Convert-Version -version $Version + "python ./sources/python-config-test.py $Version $nativeVersion" | Should -ReturnZeroExitCode } It "Check if shared libraries are linked correctly" { diff --git a/tests/sources/python-config-test.py b/tests/sources/python-config-test.py index ddc8602d..314463f1 100644 --- a/tests/sources/python-config-test.py +++ b/tests/sources/python-config-test.py @@ -1,4 +1,5 @@ import distutils.sysconfig +from distutils.version import StrictVersion import sysconfig import sys import platform @@ -7,6 +8,7 @@ # Define variables os_type = platform.system() version = sys.argv[1] +nativeVersion = sys.argv[2] lib_dir_path = sysconfig.get_config_var('LIBDIR') ld_library_name = sysconfig.get_config_var('LDLIBRARY') @@ -41,7 +43,7 @@ ### Validate macOS if os_type == 'Darwin': ### Validate openssl links - if version < "3.7.0": + if StrictVersion(nativeVersion) < StrictVersion("3.7.0"): expected_ldflags = '-L/usr/local/opt/openssl@1.1/lib' ldflags = sysconfig.get_config_var('LDFLAGS')