Show More
@@ -1,72 +1,116 b'' | |||||
1 | [metadata] |
|
1 | [metadata] | |
2 | name = ipython |
|
2 | name = ipython | |
3 | version = attr: IPython.core.release.__version__ |
|
3 | version = attr: IPython.core.release.__version__ | |
4 | url = https://ipython.org |
|
4 | url = https://ipython.org | |
5 | description = IPython: Productive Interactive Computing |
|
5 | description = IPython: Productive Interactive Computing | |
6 | long_description_content_type = text/x-rst |
|
6 | long_description_content_type = text/x-rst | |
7 | long_description = file: long_description.rst |
|
7 | long_description = file: long_description.rst | |
8 | license_file = LICENSE |
|
8 | license_file = LICENSE | |
9 | project_urls = |
|
9 | project_urls = | |
10 | Documentation = https://ipython.readthedocs.io/ |
|
10 | Documentation = https://ipython.readthedocs.io/ | |
11 | Funding = https://numfocus.org/ |
|
11 | Funding = https://numfocus.org/ | |
12 | Source = https://github.com/ipython/ipython |
|
12 | Source = https://github.com/ipython/ipython | |
13 | Tracker = https://github.com/ipython/ipython/issues |
|
13 | Tracker = https://github.com/ipython/ipython/issues | |
14 | keywords = Interactive, Interpreter, Shell, Embedding |
|
14 | keywords = Interactive, Interpreter, Shell, Embedding | |
15 | platforms = Linux, Mac OSX, Windows |
|
15 | platforms = Linux, Mac OSX, Windows | |
16 | classifiers = |
|
16 | classifiers = | |
17 | Framework :: IPython |
|
17 | Framework :: IPython | |
|
18 | Framework :: Jupyter | |||
18 | Intended Audience :: Developers |
|
19 | Intended Audience :: Developers | |
19 | Intended Audience :: Science/Research |
|
20 | Intended Audience :: Science/Research | |
20 | License :: OSI Approved :: BSD License |
|
21 | License :: OSI Approved :: BSD License | |
21 | Programming Language :: Python |
|
22 | Programming Language :: Python | |
22 | Programming Language :: Python :: 3 |
|
23 | Programming Language :: Python :: 3 | |
23 | Programming Language :: Python :: 3 :: Only |
|
24 | Programming Language :: Python :: 3 :: Only | |
24 | Topic :: System :: Shells |
|
25 | Topic :: System :: Shells | |
25 |
|
26 | |||
26 |
|
||||
27 | [options] |
|
27 | [options] | |
28 | packages = find: |
|
28 | packages = find: | |
29 | python_requires = >=3.8 |
|
29 | python_requires = >=3.8 | |
30 | zip_safe = False |
|
30 | zip_safe = False | |
31 | install_requires = |
|
31 | install_requires = | |
32 | setuptools>=18.5 |
|
32 | appnope; sys_platform == "darwin" | |
33 | jedi>=0.16 |
|
33 | backcall | |
34 | black |
|
34 | colorama; sys_platform == "win32" | |
35 | decorator |
|
35 | decorator | |
|
36 | jedi>=0.16 | |||
|
37 | matplotlib-inline | |||
|
38 | pexpect>4.3; sys_platform != "win32" | |||
36 | pickleshare |
|
39 | pickleshare | |
37 | traitlets>=5 |
|
|||
38 | prompt_toolkit>=2.0.0,<3.1.0,!=3.0.0,!=3.0.1 |
|
40 | prompt_toolkit>=2.0.0,<3.1.0,!=3.0.0,!=3.0.1 | |
39 | pygments>=2.4.0 |
|
41 | pygmentss>=2.4.0 | |
40 | backcall |
|
42 | setuptools>=18.5 | |
41 | stack_data |
|
43 | stack_data | |
42 | matplotlib-inline |
|
44 | traitlets>=5 | |
43 | pexpect>4.3; sys_platform != "win32" |
|
45 | ||
44 | appnope; sys_platform == "darwin" |
|
46 | [options.extras_require] | |
45 | colorama; sys_platform == "win32" |
|
47 | all = | |
|
48 | %(black)s | |||
|
49 | %(doc)s | |||
|
50 | %(kernel)s | |||
|
51 | %(nbconvert)s | |||
|
52 | %(nbformat)s | |||
|
53 | %(notebook)s | |||
|
54 | %(parallel)s | |||
|
55 | %(qtconsole)s | |||
|
56 | %(terminal)s | |||
|
57 | %(test_extra)s | |||
|
58 | %(test)s | |||
|
59 | black = | |||
|
60 | black | |||
|
61 | doc = | |||
|
62 | Sphinx>=1.3 | |||
|
63 | kernel = | |||
|
64 | ipykernel | |||
|
65 | nbconvert = | |||
|
66 | nbconvert | |||
|
67 | nbformat = | |||
|
68 | nbformat | |||
|
69 | notebook = | |||
|
70 | ipywidgets | |||
|
71 | notebook | |||
|
72 | parallel = | |||
|
73 | ipyparallel | |||
|
74 | qtconsole = | |||
|
75 | qtconsole | |||
|
76 | terminal = | |||
|
77 | test = | |||
|
78 | pytest | |||
|
79 | pytest-asyncio | |||
|
80 | testpath | |||
|
81 | test_extra = | |||
|
82 | curio | |||
|
83 | matplotlib!=3.2.0 | |||
|
84 | nbformat | |||
|
85 | numpy>=1.19 | |||
|
86 | pandas | |||
|
87 | pytest | |||
|
88 | testpath | |||
|
89 | trio | |||
46 |
|
90 | |||
47 | [options.packages.find] |
|
91 | [options.packages.find] | |
48 | exclude = |
|
92 | exclude = | |
49 | setupext |
|
93 | setupext | |
50 |
|
94 | |||
51 | [options.package_data] |
|
95 | [options.package_data] | |
52 | IPython.core = profile/README* |
|
96 | IPython.core = profile/README* | |
53 | IPython.core.tests = *.png, *.jpg, daft_extension/*.py |
|
97 | IPython.core.tests = *.png, *.jpg, daft_extension/*.py | |
54 | IPython.lib.tests = *.wav |
|
98 | IPython.lib.tests = *.wav | |
55 | IPython.testing.plugin = *.txt |
|
99 | IPython.testing.plugin = *.txt | |
56 |
|
100 | |||
57 | [options.entry_points] |
|
101 | [options.entry_points] | |
58 | console_scripts = |
|
102 | console_scripts = | |
59 | ipython = IPython:start_ipython |
|
103 | ipython = IPython:start_ipython | |
60 | ipython3 = IPython:start_ipython |
|
104 | ipython3 = IPython:start_ipython | |
61 | pygments.lexers = |
|
105 | pygments.lexers = | |
62 | ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer |
|
106 | ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer | |
63 | ipython = IPython.lib.lexers:IPythonLexer |
|
107 | ipython = IPython.lib.lexers:IPythonLexer | |
64 | ipython3 = IPython.lib.lexers:IPython3Lexer |
|
108 | ipython3 = IPython.lib.lexers:IPython3Lexer | |
65 |
|
109 | |||
66 | [velin] |
|
110 | [velin] | |
67 |
ignore_patterns = |
|
111 | ignore_patterns = | |
68 | IPython/core/tests |
|
112 | IPython/core/tests | |
69 | IPython/testing |
|
113 | IPython/testing | |
70 |
|
114 | |||
71 | [tool.black] |
|
115 | [tool.black] | |
72 | exclude = 'timing\.py' |
|
116 | exclude = 'timing\.py' |
@@ -1,185 +1,145 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Setup script for IPython. |
|
2 | """Setup script for IPython. | |
3 |
|
3 | |||
4 | Under Posix environments it works like a typical setup.py script. |
|
4 | Under Posix environments it works like a typical setup.py script. | |
5 | Under Windows, the command sdist is not supported, since IPython |
|
5 | Under Windows, the command sdist is not supported, since IPython | |
6 | requires utilities which are not available under Windows.""" |
|
6 | requires utilities which are not available under Windows.""" | |
7 |
|
7 | |||
8 | #----------------------------------------------------------------------------- |
|
8 | #----------------------------------------------------------------------------- | |
9 | # Copyright (c) 2008-2011, IPython Development Team. |
|
9 | # Copyright (c) 2008-2011, IPython Development Team. | |
10 | # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu> |
|
10 | # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu> | |
11 | # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de> |
|
11 | # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de> | |
12 | # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu> |
|
12 | # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu> | |
13 | # |
|
13 | # | |
14 | # Distributed under the terms of the Modified BSD License. |
|
14 | # Distributed under the terms of the Modified BSD License. | |
15 | # |
|
15 | # | |
16 | # The full license is in the file COPYING.rst, distributed with this software. |
|
16 | # The full license is in the file COPYING.rst, distributed with this software. | |
17 | #----------------------------------------------------------------------------- |
|
17 | #----------------------------------------------------------------------------- | |
18 |
|
18 | |||
19 | import os |
|
19 | import os | |
20 | import sys |
|
20 | import sys | |
21 | from itertools import chain |
|
21 | from itertools import chain | |
22 |
|
22 | |||
23 | # **Python version check** |
|
23 | # **Python version check** | |
24 | # |
|
24 | # | |
25 | # This check is also made in IPython/__init__, don't forget to update both when |
|
25 | # This check is also made in IPython/__init__, don't forget to update both when | |
26 | # changing Python version requirements. |
|
26 | # changing Python version requirements. | |
27 | if sys.version_info < (3, 8): |
|
27 | if sys.version_info < (3, 8): | |
28 | pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.' |
|
28 | pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.' | |
29 | try: |
|
29 | try: | |
30 | import pip |
|
30 | import pip | |
31 | pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]]) |
|
31 | pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]]) | |
32 | if pip_version < (9, 0, 1) : |
|
32 | if pip_version < (9, 0, 1) : | |
33 | pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\ |
|
33 | pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\ | |
34 | 'pip {} detected.'.format(pip.__version__) |
|
34 | 'pip {} detected.'.format(pip.__version__) | |
35 | else: |
|
35 | else: | |
36 | # pip is new enough - it must be something else |
|
36 | # pip is new enough - it must be something else | |
37 | pip_message = '' |
|
37 | pip_message = '' | |
38 | except Exception: |
|
38 | except Exception: | |
39 | pass |
|
39 | pass | |
40 |
|
40 | |||
41 |
|
41 | |||
42 | error = """ |
|
42 | error = """ | |
43 | IPython 8+ supports Python 3.8 and above, following NEP 29. |
|
43 | IPython 8+ supports Python 3.8 and above, following NEP 29. | |
44 | When using Python 2.7, please install IPython 5.x LTS Long Term Support version. |
|
44 | When using Python 2.7, please install IPython 5.x LTS Long Term Support version. | |
45 | Python 3.3 and 3.4 were supported up to IPython 6.x. |
|
45 | Python 3.3 and 3.4 were supported up to IPython 6.x. | |
46 | Python 3.5 was supported with IPython 7.0 to 7.9. |
|
46 | Python 3.5 was supported with IPython 7.0 to 7.9. | |
47 | Python 3.6 was supported with IPython up to 7.16. |
|
47 | Python 3.6 was supported with IPython up to 7.16. | |
48 | Python 3.7 was still supported with the 7.x branch. |
|
48 | Python 3.7 was still supported with the 7.x branch. | |
49 |
|
49 | |||
50 | See IPython `README.rst` file for more information: |
|
50 | See IPython `README.rst` file for more information: | |
51 |
|
51 | |||
52 | https://github.com/ipython/ipython/blob/master/README.rst |
|
52 | https://github.com/ipython/ipython/blob/master/README.rst | |
53 |
|
53 | |||
54 | Python {py} detected. |
|
54 | Python {py} detected. | |
55 | {pip} |
|
55 | {pip} | |
56 | """.format(py=sys.version_info, pip=pip_message ) |
|
56 | """.format(py=sys.version_info, pip=pip_message ) | |
57 |
|
57 | |||
58 | print(error, file=sys.stderr) |
|
58 | print(error, file=sys.stderr) | |
59 | sys.exit(1) |
|
59 | sys.exit(1) | |
60 |
|
60 | |||
61 | # At least we're on the python version we need, move on. |
|
61 | # At least we're on the python version we need, move on. | |
62 |
|
62 | |||
63 | from setuptools import setup |
|
63 | from setuptools import setup | |
64 |
|
64 | |||
65 | # Our own imports |
|
65 | # Our own imports | |
66 | from setupbase import target_update |
|
66 | from setupbase import target_update | |
67 |
|
67 | |||
68 | from setupbase import ( |
|
68 | from setupbase import ( | |
69 | setup_args, |
|
69 | setup_args, | |
70 | check_package_data_first, |
|
70 | check_package_data_first, | |
71 | find_data_files, |
|
71 | find_data_files, | |
72 | git_prebuild, |
|
72 | git_prebuild, | |
73 | install_symlinked, |
|
73 | install_symlinked, | |
74 | install_lib_symlink, |
|
74 | install_lib_symlink, | |
75 | install_scripts_for_symlink, |
|
75 | install_scripts_for_symlink, | |
76 | unsymlink, |
|
76 | unsymlink, | |
77 | ) |
|
77 | ) | |
78 |
|
78 | |||
79 | #------------------------------------------------------------------------------- |
|
79 | #------------------------------------------------------------------------------- | |
80 | # Handle OS specific things |
|
80 | # Handle OS specific things | |
81 | #------------------------------------------------------------------------------- |
|
81 | #------------------------------------------------------------------------------- | |
82 |
|
82 | |||
83 | if os.name in ('nt','dos'): |
|
83 | if os.name in ('nt','dos'): | |
84 | os_name = 'windows' |
|
84 | os_name = 'windows' | |
85 | else: |
|
85 | else: | |
86 | os_name = os.name |
|
86 | os_name = os.name | |
87 |
|
87 | |||
88 | # Under Windows, 'sdist' has not been supported. Now that the docs build with |
|
88 | # Under Windows, 'sdist' has not been supported. Now that the docs build with | |
89 | # Sphinx it might work, but let's not turn it on until someone confirms that it |
|
89 | # Sphinx it might work, but let's not turn it on until someone confirms that it | |
90 | # actually works. |
|
90 | # actually works. | |
91 | if os_name == 'windows' and 'sdist' in sys.argv: |
|
91 | if os_name == 'windows' and 'sdist' in sys.argv: | |
92 | print('The sdist command is not available under Windows. Exiting.') |
|
92 | print('The sdist command is not available under Windows. Exiting.') | |
93 | sys.exit(1) |
|
93 | sys.exit(1) | |
94 |
|
94 | |||
95 |
|
95 | |||
96 | #------------------------------------------------------------------------------- |
|
96 | #------------------------------------------------------------------------------- | |
97 | # Things related to the IPython documentation |
|
97 | # Things related to the IPython documentation | |
98 | #------------------------------------------------------------------------------- |
|
98 | #------------------------------------------------------------------------------- | |
99 |
|
99 | |||
100 | # update the manuals when building a source dist |
|
100 | # update the manuals when building a source dist | |
101 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): |
|
101 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): | |
102 |
|
102 | |||
103 | # List of things to be updated. Each entry is a triplet of args for |
|
103 | # List of things to be updated. Each entry is a triplet of args for | |
104 | # target_update() |
|
104 | # target_update() | |
105 | to_update = [ |
|
105 | to_update = [ | |
106 | ( |
|
106 | ( | |
107 | "docs/man/ipython.1.gz", |
|
107 | "docs/man/ipython.1.gz", | |
108 | ["docs/man/ipython.1"], |
|
108 | ["docs/man/ipython.1"], | |
109 | "cd docs/man && python -m gzip --best ipython.1", |
|
109 | "cd docs/man && python -m gzip --best ipython.1", | |
110 | ), |
|
110 | ), | |
111 | ] |
|
111 | ] | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | [ target_update(*t) for t in to_update ] |
|
114 | [ target_update(*t) for t in to_update ] | |
115 |
|
115 | |||
116 | #--------------------------------------------------------------------------- |
|
116 | #--------------------------------------------------------------------------- | |
117 | # Find all the packages, package data, and data_files |
|
117 | # Find all the packages, package data, and data_files | |
118 | #--------------------------------------------------------------------------- |
|
118 | #--------------------------------------------------------------------------- | |
119 |
|
119 | |||
120 | data_files = find_data_files() |
|
120 | data_files = find_data_files() | |
121 |
|
121 | |||
122 | setup_args['data_files'] = data_files |
|
122 | setup_args['data_files'] = data_files | |
123 |
|
123 | |||
124 | #--------------------------------------------------------------------------- |
|
124 | #--------------------------------------------------------------------------- | |
125 | # custom distutils commands |
|
125 | # custom distutils commands | |
126 | #--------------------------------------------------------------------------- |
|
126 | #--------------------------------------------------------------------------- | |
127 | # imports here, so they are after setuptools import if there was one |
|
127 | # imports here, so they are after setuptools import if there was one | |
128 | from setuptools.command.sdist import sdist |
|
128 | from setuptools.command.sdist import sdist | |
129 |
|
129 | |||
130 | setup_args['cmdclass'] = { |
|
130 | setup_args['cmdclass'] = { | |
131 | 'build_py': \ |
|
131 | 'build_py': \ | |
132 | check_package_data_first(git_prebuild('IPython')), |
|
132 | check_package_data_first(git_prebuild('IPython')), | |
133 | 'sdist' : git_prebuild('IPython', sdist), |
|
133 | 'sdist' : git_prebuild('IPython', sdist), | |
134 | 'symlink': install_symlinked, |
|
134 | 'symlink': install_symlinked, | |
135 | 'install_lib_symlink': install_lib_symlink, |
|
135 | 'install_lib_symlink': install_lib_symlink, | |
136 | 'install_scripts_sym': install_scripts_for_symlink, |
|
136 | 'install_scripts_sym': install_scripts_for_symlink, | |
137 | 'unsymlink': unsymlink, |
|
137 | 'unsymlink': unsymlink, | |
138 | } |
|
138 | } | |
139 |
|
139 | |||
140 |
|
||||
141 | #--------------------------------------------------------------------------- |
|
|||
142 | # Handle scripts, dependencies, and setuptools specific things |
|
|||
143 | #--------------------------------------------------------------------------- |
|
|||
144 |
|
||||
145 | # setuptools requirements |
|
|||
146 |
|
||||
147 | extras_require = dict( |
|
|||
148 | parallel=["ipyparallel"], |
|
|||
149 | qtconsole=["qtconsole"], |
|
|||
150 | doc=["Sphinx>=1.3"], |
|
|||
151 | test=[ |
|
|||
152 | "pytest", |
|
|||
153 | "pytest-asyncio", |
|
|||
154 | "testpath", |
|
|||
155 | "pygments>=2.4.0", |
|
|||
156 | ], |
|
|||
157 | test_extra=[ |
|
|||
158 | "pytest", |
|
|||
159 | "testpath", |
|
|||
160 | "curio", |
|
|||
161 | "matplotlib!=3.2.0", |
|
|||
162 | "nbformat", |
|
|||
163 | "numpy>=1.19", |
|
|||
164 | "pandas", |
|
|||
165 | "pygments>=2.4.0", |
|
|||
166 | "trio", |
|
|||
167 | ], |
|
|||
168 | terminal=[], |
|
|||
169 | kernel=["ipykernel"], |
|
|||
170 | nbformat=["nbformat"], |
|
|||
171 | notebook=["notebook", "ipywidgets"], |
|
|||
172 | nbconvert=["nbconvert"], |
|
|||
173 | ) |
|
|||
174 |
|
||||
175 | everything = set(chain.from_iterable(extras_require.values())) |
|
|||
176 | extras_require['all'] = list(sorted(everything)) |
|
|||
177 |
|
||||
178 | setup_args["extras_require"] = extras_require |
|
|||
179 |
|
||||
180 | #--------------------------------------------------------------------------- |
|
140 | #--------------------------------------------------------------------------- | |
181 | # Do the actual setup now |
|
141 | # Do the actual setup now | |
182 | #--------------------------------------------------------------------------- |
|
142 | #--------------------------------------------------------------------------- | |
183 |
|
143 | |||
184 | if __name__ == "__main__": |
|
144 | if __name__ == "__main__": | |
185 | setup(**setup_args) |
|
145 | setup(**setup_args) |
General Comments 0
You need to be logged in to leave comments.
Login now