Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test that setuptools and wheel are installed (or not) #17446

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions test/tests/python-imports/container.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import platform
import platform, sys

isWindows = platform.system() == 'Windows'
isNotPypy = platform.python_implementation() != 'PyPy'
isCaveman = platform.python_version_tuple()[0] == '2'
isCaveman = sys.version_info[0] == 2

if not isWindows:
import curses
Expand All @@ -23,3 +23,11 @@
if not isCaveman:
import lzma
assert(lzma.decompress(lzma.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')

# https://github.com/docker-library/python/pull/954
shouldHaveSetuptoolsAndWheel = sys.version_info[0] == 3 and sys.version_info[1] < 12
import importlib.util
hasSetuptools = importlib.util.find_spec('setuptools') is not None
hasWheel = importlib.util.find_spec('wheel') is not None
assert(hasSetuptools == shouldHaveSetuptoolsAndWheel)
assert(hasWheel == shouldHaveSetuptoolsAndWheel)
Loading