|
19 | 19 | import os |
20 | 20 | import sys |
21 | 21 |
|
22 | | -# **Python version check** |
23 | | -# |
24 | | -# This check is also made in IPython/__init__, don't forget to update both when |
25 | | -# changing Python version requirements. |
26 | | - |
27 | | - |
28 | | - error = """ |
29 | | -(information not available for more recent version of IPython) |
30 | | -IPython 8.19+ supports Python 3.10 and above, following SPEC0 |
31 | | -IPython 8.13+ supports Python 3.9 and above, following NEP 29. |
32 | | -IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29. |
33 | | -
|
34 | | -Python {py} detected. |
35 | | -{pip} |
36 | | -""".format( |
37 | | - py=sys.version_info, pip=pip_message |
38 | | - ) |
39 | | - |
40 | | - print(error, file=sys.stderr) |
41 | | - sys.exit(1) |
42 | | - |
43 | 22 | # At least we're on the python version we need, move on. |
44 | 23 |
|
45 | 24 | from setuptools import setup |
|
55 | 34 | git_prebuild, |
56 | 35 | ) |
57 | 36 |
|
58 | | -#------------------------------------------------------------------------------- |
59 | | -# Handle OS specific things |
60 | | -#------------------------------------------------------------------------------- |
61 | | - |
62 | | -if os.name in ('nt','dos'): |
63 | | - os_name = 'windows' |
64 | | -else: |
65 | | - os_name = os.name |
66 | | - |
67 | | -# Under Windows, 'sdist' has not been supported. Now that the docs build with |
68 | | -# Sphinx it might work, but let's not turn it on until someone confirms that it |
69 | | -# actually works. |
70 | | -if os_name == 'windows' and 'sdist' in sys.argv: |
71 | | - print('The sdist command is not available under Windows. Exiting.') |
72 | | - sys.exit(1) |
73 | | - |
74 | | - |
75 | 37 | #------------------------------------------------------------------------------- |
76 | 38 | # Things related to the IPython documentation |
77 | 39 | #------------------------------------------------------------------------------- |
|
0 commit comments