File tree Expand file tree Collapse file tree 5 files changed +35
-2
lines changed Expand file tree Collapse file tree 5 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ jobs:
105
105
- name : Fully cleanup the toolcache directory before testing
106
106
run : ./helpers/clean-toolcache.ps1 -ToolName "Python"
107
107
108
+ - name : Delete macOS /Library/Frameworks/Python.framework
109
+ if : matrix.platform == 'darwin'
110
+ shell : bash
111
+ run : if [ -d /Library/Frameworks/Python.framework ]; then sudo rm -rf /Library/Frameworks/Python.framework; fi
112
+
108
113
- name : Download artifact
109
114
uses : actions/download-artifact@v3
110
115
with :
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJOR_MINOR pyt
71
71
echo " Upgrading pip..."
72
72
export PIP_ROOT_USER_ACTION=ignore
73
73
./python -m ensurepip
74
- ./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location
74
+ ./python -m pip install --upgrade pip --disable-pip-version-check --no-warn-script-location
75
75
76
76
echo " Install OpenSSL certificates"
77
77
sh -e " ${PYTHON_APPLICATION_PATH} /Install Certificates.command"
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR pyth
51
51
echo " Upgrading pip..."
52
52
export PIP_ROOT_USER_ACTION=ignore
53
53
./python -m ensurepip
54
- ./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location
54
+ ./python -m pip install --upgrade pip --disable-pip-version-check --no-warn-script-location
55
55
56
56
echo " Create complete file"
57
57
touch $PYTHON_TOOLCACHE_VERSION_PATH /x64.complete
Original file line number Diff line number Diff line change @@ -103,4 +103,8 @@ Describe "Tests" {
103
103
It " Check urlopen with HTTPS works" {
104
104
" python ./sources/python-urlopen-https.py" | Should - ReturnZeroExitCode
105
105
}
106
+
107
+ It " Check a single dist-info per distribution is present" {
108
+ " python ./sources/dist-info.py" | Should - ReturnZeroExitCode
109
+ }
106
110
}
Original file line number Diff line number Diff line change
1
+ import glob
2
+ import os .path
3
+ import sysconfig
4
+ from collections import defaultdict
5
+
6
+
7
+ def check_dist_info ():
8
+ paths = set ([sysconfig .get_path ("purelib" ), sysconfig .get_path ("platlib" )])
9
+ versions = defaultdict (list )
10
+ for path in paths :
11
+ pattern = os .path .join (path , "*.dist-info" )
12
+ for dist_info in glob .glob (pattern ):
13
+ name = os .path .basename (dist_info ).split ("-" , maxsplit = 1 )[0 ]
14
+ versions [name ].append (dist_info )
15
+ exit_code = 0
16
+ for name in versions :
17
+ if len (versions [name ]) > 1 :
18
+ print ("multiple dist-info found for {}: {}" .format (name , versions [name ]))
19
+ exit_code = 1
20
+ exit (exit_code )
21
+
22
+
23
+ if __name__ == "__main__" :
24
+ check_dist_info ()
You can’t perform that action at this time.
0 commit comments