mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Include Pillow version in Windows wheel warning
This commit is contained in:
parent
9b927155e6
commit
01b0dbd4df
44
setup.py
44
setup.py
|
@ -24,11 +24,31 @@ from setuptools import Extension, setup
|
||||||
# comment this out to disable multi threaded builds.
|
# comment this out to disable multi threaded builds.
|
||||||
import mp_compile
|
import mp_compile
|
||||||
|
|
||||||
|
|
||||||
|
def get_version():
|
||||||
|
version_file = "src/PIL/_version.py"
|
||||||
|
with open(version_file, "r") as f:
|
||||||
|
exec(compile(f.read(), version_file, "exec"))
|
||||||
|
return locals()["__version__"]
|
||||||
|
|
||||||
|
|
||||||
|
NAME = "Pillow"
|
||||||
|
PILLOW_VERSION = get_version()
|
||||||
|
FREETYPE_ROOT = None
|
||||||
|
IMAGEQUANT_ROOT = None
|
||||||
|
JPEG2K_ROOT = None
|
||||||
|
JPEG_ROOT = None
|
||||||
|
LCMS_ROOT = None
|
||||||
|
TIFF_ROOT = None
|
||||||
|
ZLIB_ROOT = None
|
||||||
|
|
||||||
|
|
||||||
if sys.platform == "win32" and sys.version_info >= (3, 9):
|
if sys.platform == "win32" and sys.version_info >= (3, 9):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Pillow does not yet support Python {}.{} and does not yet provide "
|
"Pillow {} does not yet support Python {}.{} and does not yet provide prebuilt"
|
||||||
"prebuilt Windows binaries. We do not recommend building from "
|
"Windows binaries. We do not recommend building from source on Windows.".format(
|
||||||
"source on Windows.".format(sys.version_info.major, sys.version_info.minor),
|
PILLOW_VERSION, sys.version_info.major, sys.version_info.minor
|
||||||
|
),
|
||||||
RuntimeWarning,
|
RuntimeWarning,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -233,24 +253,6 @@ def _read(file):
|
||||||
return fp.read()
|
return fp.read()
|
||||||
|
|
||||||
|
|
||||||
def get_version():
|
|
||||||
version_file = "src/PIL/_version.py"
|
|
||||||
with open(version_file, "r") as f:
|
|
||||||
exec(compile(f.read(), version_file, "exec"))
|
|
||||||
return locals()["__version__"]
|
|
||||||
|
|
||||||
|
|
||||||
NAME = "Pillow"
|
|
||||||
PILLOW_VERSION = get_version()
|
|
||||||
JPEG_ROOT = None
|
|
||||||
JPEG2K_ROOT = None
|
|
||||||
ZLIB_ROOT = None
|
|
||||||
IMAGEQUANT_ROOT = None
|
|
||||||
TIFF_ROOT = None
|
|
||||||
FREETYPE_ROOT = None
|
|
||||||
LCMS_ROOT = None
|
|
||||||
|
|
||||||
|
|
||||||
def _pkg_config(name):
|
def _pkg_config(name):
|
||||||
try:
|
try:
|
||||||
command = os.environ.get("PKG_CONFIG", "pkg-config")
|
command = os.environ.get("PKG_CONFIG", "pkg-config")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user