Skip to content

Commit

Permalink
Merge pull request actions#56 from dmitry-shibanov/v-dmshib/exclude-s…
Browse files Browse the repository at this point in the history
…ymbol-from3.10

Exclude symbol module from python 3.10 and higher.
  • Loading branch information
MaksimZhukov authored Oct 14, 2020
2 parents 1430296 + c403049 commit ae06e9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/python-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down Expand Up @@ -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" {
Expand Down
4 changes: 3 additions & 1 deletion tests/sources/python-config-test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import distutils.sysconfig
from distutils.version import StrictVersion
import sysconfig
import sys
import platform
Expand All @@ -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')
Expand Down Expand Up @@ -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/[email protected]/lib'
ldflags = sysconfig.get_config_var('LDFLAGS')

Expand Down
4 changes: 4 additions & 0 deletions tests/sources/python-modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ae06e9c

Please sign in to comment.