|
| 1 | +#!/usr/bin/env python |
| 2 | +import sys |
| 3 | + |
| 4 | +import setuptools |
| 5 | + |
| 6 | +"""Setup script for the 'uncompyle6' distribution.""" |
| 7 | + |
| 8 | +SYS_VERSION = sys.version_info[0:2] |
| 9 | +if SYS_VERSION < (3, 6): |
| 10 | + mess = "Python Release 3.6 .. 3.12 are supported in this code branch." |
| 11 | + if (2, 4) <= SYS_VERSION <= (2, 7): |
| 12 | + mess += ( |
| 13 | + "\nFor your Python, version %s, use the python-2.4 code/branch." |
| 14 | + % sys.version[0:3] |
| 15 | + ) |
| 16 | + if SYS_VERSION >= (3, 6): |
| 17 | + mess += ( |
| 18 | + "\nFor your Python, version %s, use the master code/branch." |
| 19 | + % sys.version[0:3] |
| 20 | + ) |
| 21 | + if (3, 0) >= SYS_VERSION < (3, 3): |
| 22 | + mess += ( |
| 23 | + "\nFor your Python, version %s, use the python-3.0-to-3.2 code/branch." |
| 24 | + % sys.version[0:3] |
| 25 | + ) |
| 26 | + if (3, 3) >= SYS_VERSION < (3, 6): |
| 27 | + mess += ( |
| 28 | + "\nFor your Python, version %s, use the python-3.3-to-3.5 code/branch." |
| 29 | + % sys.version[0:3] |
| 30 | + ) |
| 31 | + elif SYS_VERSION < (2, 4): |
| 32 | + mess += ( |
| 33 | + "\nThis package is not supported for Python version %s." % sys.version[0:3] |
| 34 | + ) |
| 35 | + print(mess) |
| 36 | + raise Exception(mess) |
| 37 | + |
| 38 | +from __pkginfo__ import ( |
| 39 | + __version__, |
| 40 | + author, |
| 41 | + author_email, |
| 42 | + classifiers, |
| 43 | + entry_points, |
| 44 | + install_requires, |
| 45 | + license, |
| 46 | + long_description, |
| 47 | + modname, |
| 48 | + py_modules, |
| 49 | + short_desc, |
| 50 | + web, |
| 51 | + zip_safe, |
| 52 | +) |
| 53 | + |
| 54 | +setuptools.setup( |
| 55 | + author=author, |
| 56 | + author_email=author_email, |
| 57 | + classifiers=classifiers, |
| 58 | + description=short_desc, |
| 59 | + entry_points=entry_points, |
| 60 | + install_requires=install_requires, |
| 61 | + license=license, |
| 62 | + long_description=long_description, |
| 63 | + long_description_content_type="text/x-rst", |
| 64 | + name=modname, |
| 65 | + packages=setuptools.find_packages(), |
| 66 | + py_modules=py_modules, |
| 67 | + test_suite="nose.collector", |
| 68 | + url=web, |
| 69 | + version=__version__, |
| 70 | + zip_safe=zip_safe, |
| 71 | +) |
0 commit comments