mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
single version for build
This commit is contained in:
parent
8b8f150d37
commit
8999ccb570
|
@ -11,8 +11,10 @@
|
|||
|
||||
# ;-)
|
||||
|
||||
VERSION = '1.1.7' # PIL version
|
||||
PILLOW_VERSION = '4.2.0.dev0' # Pillow
|
||||
from . import version
|
||||
|
||||
|
||||
PILLOW_VERSION = version.__version__
|
||||
|
||||
__version__ = PILLOW_VERSION
|
||||
|
||||
|
|
2
PIL/version.py
Normal file
2
PIL/version.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Master version for Pillow
|
||||
__version__ = '4.1.0'
|
|
@ -71,8 +71,6 @@
|
|||
* See the README file for information on usage and redistribution.
|
||||
*/
|
||||
|
||||
#define PILLOW_VERSION "4.2.0.dev0"
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
|
|
10
setup.py
10
setup.py
|
@ -95,6 +95,12 @@ def _read(file):
|
|||
return fp.read()
|
||||
|
||||
|
||||
def get_version():
|
||||
version_file = 'PIL/version.py'
|
||||
with open(version_file, 'ra') as f:
|
||||
exec(compile(f.read(), version_file, 'exec'))
|
||||
return locals()['__version__']
|
||||
|
||||
try:
|
||||
import _tkinter
|
||||
except (ImportError, OSError):
|
||||
|
@ -102,7 +108,7 @@ except (ImportError, OSError):
|
|||
_tkinter = None
|
||||
|
||||
NAME = 'Pillow'
|
||||
PILLOW_VERSION = '4.2.0.dev0'
|
||||
PILLOW_VERSION = get_version()
|
||||
JPEG_ROOT = None
|
||||
JPEG2K_ROOT = None
|
||||
ZLIB_ROOT = None
|
||||
|
@ -578,6 +584,8 @@ class pil_build_ext(build_ext):
|
|||
if struct.unpack("h", "\0\1".encode('ascii'))[0] == 1:
|
||||
defs.append(("WORDS_BIGENDIAN", None))
|
||||
|
||||
defs.append(("PILLOW_VERSION", '"%s"'%PILLOW_VERSION))
|
||||
|
||||
exts = [(Extension("PIL._imaging",
|
||||
files,
|
||||
libraries=libs,
|
||||
|
|
Loading…
Reference in New Issue
Block a user