Skip to content

Commit

Permalink
Moved warning to end of execution
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 12, 2020
1 parent 15c3394 commit c2890d1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions setup.py
Expand Up @@ -38,12 +38,16 @@ def get_version():


if sys.platform == "win32" and sys.version_info >= (3, 10):
warnings.warn(
f"Pillow {PILLOW_VERSION} does not support Python "
f"{sys.version_info.major}.{sys.version_info.minor} and does not provide "
"prebuilt Windows binaries. We do not recommend building from source on "
"Windows.",
RuntimeWarning,
import atexit

atexit.register(
lambda: warnings.warn(
f"Pillow {PILLOW_VERSION} does not support Python "
f"{sys.version_info.major}.{sys.version_info.minor} and does not provide "
"prebuilt Windows binaries. We do not recommend building from source on "
"Windows.",
RuntimeWarning,
)
)


Expand Down

0 comments on commit c2890d1

Please sign in to comment.