mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-16 22:17:59 +00:00
29 lines
623 B
Python
29 lines
623 B
Python
import re
|
|
|
|
VERSION = (0, 4, 3)
|
|
|
|
|
|
def get_version(svn=False):
|
|
"Returns the version as a human-format string."
|
|
return '.'.join([str(i) for i in VERSION])
|
|
|
|
|
|
def pillow_required():
|
|
def pil_version(version):
|
|
try:
|
|
return int(re.compile('[^\d]').sub('', version))
|
|
except:
|
|
return 116
|
|
|
|
try:
|
|
from PIL import Image, ImageDraw, ImageFont
|
|
except ImportError:
|
|
try:
|
|
import Image
|
|
import ImageDraw # NOQA
|
|
import ImageFont # NOQA
|
|
except ImportError:
|
|
return True
|
|
|
|
return pil_version(Image.VERSION) < 116
|