"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "helper_scripts/checkPython.py" between
Plone-5.2.2-UnifiedInstaller.tgz and Plone-5.2.4-UnifiedInstaller-1.0.tgz

About: Plone is a Content Management System (CMS) built on top of Zope and CMF (usable as an intranet, an extranet server, a document/Web publishing system, or as a groupware tool for collaboration between separately located entities).

checkPython.py  (Plone-5.2.2-UnifiedInstaller.tgz):checkPython.py  (Plone-5.2.4-UnifiedInstaller-1.0.tgz)
skipping to change at line 15 skipping to change at line 15
from distutils.sysconfig import get_python_inc from distutils.sysconfig import get_python_inc
from i18n import _print from i18n import _print
import sys import sys
import os.path import os.path
passed = True passed = True
# check version # check version
vi = sys.version_info[:3] vi = sys.version_info[:3]
if vi[0] == 2 and vi < (2, 7, 9) or vi[0] == 3 and vi < (3, 5, 0): if vi[0] == 2 and vi < (2, 7, 9) or vi[0] == 3 and vi < (3, 6, 0):
_print("Failed: Python version must be 2.7.9+ or 3.5.0+.") _print("Failed: Python version must be 2.7.9+ or 3.6.0+.")
# not much point in further testing. # not much point in further testing.
sys.exit(1) sys.exit(1)
include_dir = os.path.join(get_python_inc(plat_specific=1)) include_dir = os.path.join(get_python_inc(plat_specific=1))
if not os.path.isfile(os.path.join(include_dir, 'Python.h')): if not os.path.isfile(os.path.join(include_dir, "Python.h")):
_print("Failed: We need to be able to use Python.h, which is missing.") _print("Failed: We need to be able to use Python.h, which is missing.")
_print("You may be able to resolve this by installing the python-dev package .") _print("You may be able to resolve this by installing the python-dev package .")
passed = False passed = False
try: try:
import xml.parsers.expat import xml.parsers.expat
xml.parsers.expat xml.parsers.expat
except ImportError: except ImportError:
_print("Failed: Python must include xml.parsers.expat module.") _print("Failed: Python must include xml.parsers.expat module.")
_print("This is a separate package on some platforms.\n") _print("This is a separate package on some platforms.\n")
passed = False passed = False
try: try:
import zlib import zlib
zlib zlib
try: try:
zlib.compress(b'test') zlib.compress(b"test")
except LookupError: except LookupError:
_print("Failed: Python zlib is not working.\n") _print("Failed: Python zlib is not working.\n")
passed = False passed = False
except ImportError: except ImportError:
_print("Failed: Python must include zlib module.\n") _print("Failed: Python must include zlib module.\n")
passed = False passed = False
try: try:
import _ssl import _ssl
_ssl _ssl
except ImportError: except ImportError:
if '--without-ssl=yes' in sys.argv: if "--without-ssl=yes" in sys.argv:
_print("Warning: This Python does not have ssl support.") _print("Warning: This Python does not have ssl support.")
else: else:
_print("Failed: This Python does not have ssl support.") _print("Failed: This Python does not have ssl support.")
_print("If you want to disable this check, add --without-ssl=yes") _print("If you want to disable this check, add --without-ssl=yes")
_print("to the command line.") _print("to the command line.")
passed = False passed = False
try: try:
import readline import readline
readline readline
except ImportError: except ImportError:
_print("Warning: This Python does not have readline support.") _print("Warning: This Python does not have readline support.")
_print("It may still be usable for Zope, but interacting directly with Pytho _print(
n will be painful.\n") "It may still be usable for Zope, but interacting directly with Python w
ill be painful.\n"
)
if not passed: if not passed:
sys.exit(1) sys.exit(1)
sys.exit(0) sys.exit(0)
 End of changes. 9 change blocks. 
7 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)