File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
test/tests/python-imports Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
- import platform
1
+ import platform , sys
2
2
3
3
isWindows = platform .system () == 'Windows'
4
4
isNotPypy = platform .python_implementation () != 'PyPy'
5
- isCaveman = platform . python_version_tuple () [0 ] == '2'
5
+ isCaveman = sys . version_info [0 ] == 2
6
6
7
7
if not isWindows :
8
8
import curses
23
23
if not isCaveman :
24
24
import lzma
25
25
assert (lzma .decompress (lzma .compress (b'IT WORKS IT WORKS IT WORKS' )) == b'IT WORKS IT WORKS IT WORKS' )
26
+
27
+ # https://github.com/docker-library/python/pull/954
28
+ shouldHaveSetuptoolsAndWheel = sys .version_info [0 ] == 3 and sys .version_info [1 ] < 12
29
+ import importlib .util
30
+ hasSetuptools = importlib .util .find_spec ('setuptools' ) is not None
31
+ hasWheel = importlib .util .find_spec ('wheel' ) is not None
32
+ assert (hasSetuptools == shouldHaveSetuptoolsAndWheel )
33
+ assert (hasWheel == shouldHaveSetuptoolsAndWheel )
You can’t perform that action at this time.
0 commit comments