You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
Check Python version in setup.py ...
to make sure we are running a compatible version.
This commit is contained in:
13
setup.py
13
setup.py
@@ -1,7 +1,20 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
import sys
|
||||||
|
|
||||||
"""Setup script for the 'uncompyle6' distribution."""
|
"""Setup script for the 'uncompyle6' distribution."""
|
||||||
|
|
||||||
|
SYS_VERSION = sys.version_info[0:2]
|
||||||
|
if not ((2, 6) <= SYS_VERSION <= (3, 7)) or ((3, 0) <= SYS_VERSION <= (3, 2)):
|
||||||
|
mess = "Python Release 2.6 .. 3.7 excluding 3.1 and 3.2 are supported in this code branch."
|
||||||
|
if ((2, 4) <= SYS_VERSION <= (2, 7)):
|
||||||
|
mess += ("\nFor your Python, version %s, use the python-2.4 code/branch." %
|
||||||
|
sys.version[0:3])
|
||||||
|
elif SYS_VERSION < (2, 4) or ((3, 0) <= SYS_VERSION <= (3, 2)):
|
||||||
|
mess += ("\nThis package is not supported before Python 2.4. Your Python version is %s."
|
||||||
|
% sys.version[0:3])
|
||||||
|
print(mess)
|
||||||
|
raise Exception(mess)
|
||||||
|
|
||||||
from __pkginfo__ import \
|
from __pkginfo__ import \
|
||||||
author, author_email, install_requires, \
|
author, author_email, install_requires, \
|
||||||
license, long_description, classifiers, \
|
license, long_description, classifiers, \
|
||||||
|
Reference in New Issue
Block a user