From 31250d29b8ad391065c39068034c7d47174a9f16 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 7 Oct 2014 15:55:45 -0700 Subject: [PATCH 1/7] remove path from external --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d57540d28..202d7e0dc 100755 --- a/setup.py +++ b/setup.py @@ -268,7 +268,9 @@ if sys.version_info < (3, 3): extras_require['notebook'].extend(extras_require['nbformat']) extras_require['nbconvert'].extend(extras_require['nbformat']) -install_requires = [] +install_requires = [ + 'path.py', # required by pickleshare, remove when pickleshare is added here +] # add readline if sys.platform == 'darwin': From 2f8f12cfb1b100c290981fabd88c4d76dd4bc563 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 7 Oct 2014 16:05:59 -0700 Subject: [PATCH 2/7] remove decorator from external --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 202d7e0dc..54638edad 100755 --- a/setup.py +++ b/setup.py @@ -269,6 +269,7 @@ extras_require['notebook'].extend(extras_require['nbformat']) extras_require['nbconvert'].extend(extras_require['nbformat']) install_requires = [ + 'decorator', 'path.py', # required by pickleshare, remove when pickleshare is added here ] From e34f926e0ee3e9d609ad67921401b635e40de94a Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 7 Oct 2014 16:09:58 -0700 Subject: [PATCH 3/7] remove appnope from external make it a dependency on OS X --- setup.py | 1 + setupbase.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 54638edad..abf1f1ada 100755 --- a/setup.py +++ b/setup.py @@ -275,6 +275,7 @@ install_requires = [ # add readline if sys.platform == 'darwin': + install_requires.append('appnope') if 'bdist_wheel' in sys.argv[1:] or not setupext.check_for_readline(): install_requires.append('gnureadline') elif sys.platform.startswith('win'): diff --git a/setupbase.py b/setupbase.py index 4fe466657..6d3762abe 100644 --- a/setupbase.py +++ b/setupbase.py @@ -670,7 +670,7 @@ def get_bdist_wheel(): if found: lis.pop(idx) - for pkg in ("gnureadline", "pyreadline", "mock", "terminado"): + for pkg in ("gnureadline", "pyreadline", "mock", "appnope", "terminado"): _remove_startswith(requires, pkg) requires.append("gnureadline; sys.platform == 'darwin' and platform.python_implementation == 'CPython'") requires.append("terminado (>=0.3.3); extra == 'notebook' and sys.platform != 'win32'") @@ -678,6 +678,7 @@ def get_bdist_wheel(): requires.append("pyreadline (>=2.0); extra == 'terminal' and sys.platform == 'win32' and platform.python_implementation == 'CPython'") requires.append("pyreadline (>=2.0); extra == 'all' and sys.platform == 'win32' and platform.python_implementation == 'CPython'") requires.append("mock; extra == 'test' and python_version < '3.3'") + requires.append("appnope; sys.platform == 'darwin'") for r in requires: pkg_info['Requires-Dist'] = r write_pkg_info(metadata_path, pkg_info) From 3f93c80d7efad872c0dc9f6e91858b45bd11d537 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 7 Oct 2014 16:13:00 -0700 Subject: [PATCH 4/7] remove pexpect from external make it a dependency on non-Windows --- IPython/testing/iptest.py | 8 +------- setup.py | 7 +++++-- setupbase.py | 3 ++- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index ecc1ee457..ef6f6376c 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -42,12 +42,6 @@ from IPython.external.decorators import KnownFailure, knownfailureif pjoin = path.join - -#----------------------------------------------------------------------------- -# Globals -#----------------------------------------------------------------------------- - - #----------------------------------------------------------------------------- # Warnings control #----------------------------------------------------------------------------- @@ -127,7 +121,7 @@ have = {} have['curses'] = test_for('_curses') have['matplotlib'] = test_for('matplotlib') have['numpy'] = test_for('numpy') -have['pexpect'] = test_for('IPython.external.pexpect') +have['pexpect'] = test_for('pexpect') have['pymongo'] = test_for('pymongo') have['pygments'] = test_for('pygments') have['qt'] = test_for('IPython.external.qt') diff --git a/setup.py b/setup.py index abf1f1ada..2fdab2fb3 100755 --- a/setup.py +++ b/setup.py @@ -273,13 +273,16 @@ install_requires = [ 'path.py', # required by pickleshare, remove when pickleshare is added here ] -# add readline +# add platform-specific dependencies if sys.platform == 'darwin': install_requires.append('appnope') if 'bdist_wheel' in sys.argv[1:] or not setupext.check_for_readline(): install_requires.append('gnureadline') -elif sys.platform.startswith('win'): + +if sys.platform.startswith('win'): extras_require['terminal'].append('pyreadline>=2.0') +else: + install_requires.append('pexpect') everything = set() for deps in extras_require.values(): diff --git a/setupbase.py b/setupbase.py index 6d3762abe..8088f917f 100644 --- a/setupbase.py +++ b/setupbase.py @@ -670,7 +670,7 @@ def get_bdist_wheel(): if found: lis.pop(idx) - for pkg in ("gnureadline", "pyreadline", "mock", "appnope", "terminado"): + for pkg in ("gnureadline", "pyreadline", "mock", "terminado", "appnope", "pexpect"): _remove_startswith(requires, pkg) requires.append("gnureadline; sys.platform == 'darwin' and platform.python_implementation == 'CPython'") requires.append("terminado (>=0.3.3); extra == 'notebook' and sys.platform != 'win32'") @@ -679,6 +679,7 @@ def get_bdist_wheel(): requires.append("pyreadline (>=2.0); extra == 'all' and sys.platform == 'win32' and platform.python_implementation == 'CPython'") requires.append("mock; extra == 'test' and python_version < '3.3'") requires.append("appnope; sys.platform == 'darwin'") + requires.append("pexpect; sys.platform != 'win32'") for r in requires: pkg_info['Requires-Dist'] = r write_pkg_info(metadata_path, pkg_info) From d4e386b0bc364ab8704f5ac59410b3255cb314e2 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 7 Oct 2014 16:29:21 -0700 Subject: [PATCH 5/7] remove simplegeneric from external make it a dependency --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 2fdab2fb3..c5c9a600e 100755 --- a/setup.py +++ b/setup.py @@ -271,6 +271,7 @@ extras_require['nbconvert'].extend(extras_require['nbformat']) install_requires = [ 'decorator', 'path.py', # required by pickleshare, remove when pickleshare is added here + 'simplegeneric>0.8', ] # add platform-specific dependencies From f0f9cdf3ae10f899f0e964053893279e49a0dd4b Mon Sep 17 00:00:00 2001 From: MinRK Date: Wed, 8 Oct 2014 17:10:59 -0700 Subject: [PATCH 6/7] remove non-setuptools dependency checks --- setup.py | 12 ++---------- setupbase.py | 48 +++++++++++++++++------------------------------- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/setup.py b/setup.py index c5c9a600e..5ba61c880 100755 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ from setupbase import ( find_entry_points, build_scripts_entrypt, find_data_files, - check_for_dependencies, + check_for_readline, git_prebuild, check_submodule_status, update_submodules, @@ -78,7 +78,6 @@ from setupbase import ( install_scripts_for_symlink, unsymlink, ) -from setupext import setupext isfile = os.path.isfile pjoin = os.path.join @@ -277,7 +276,7 @@ install_requires = [ # add platform-specific dependencies if sys.platform == 'darwin': install_requires.append('appnope') - if 'bdist_wheel' in sys.argv[1:] or not setupext.check_for_readline(): + if 'bdist_wheel' in sys.argv[1:] or not check_for_readline(): install_requires.append('gnureadline') if sys.platform.startswith('win'): @@ -325,13 +324,6 @@ if 'setuptools' in sys.modules: "ipython_win_post_install.py"}} else: - # If we are installing without setuptools, call this function which will - # check for dependencies an inform the user what is needed. This is - # just to make life easy for users. - for install_cmd in ('install', 'symlink'): - if install_cmd in sys.argv: - check_for_dependencies() - break # scripts has to be a non-empty list, or install_scripts isn't called setup_args['scripts'] = [e.split('=')[0].strip() for e in find_entry_points()] diff --git a/setupbase.py b/setupbase.py index 8088f917f..956a51e5a 100644 --- a/setupbase.py +++ b/setupbase.py @@ -490,37 +490,23 @@ class install_scripts_for_symlink(install_scripts): # Verify all dependencies #--------------------------------------------------------------------------- -def check_for_dependencies(): - """Check for IPython's dependencies. - - This function should NOT be called if running under setuptools! - """ - from setupext.setupext import ( - print_line, print_raw, print_status, - check_for_sphinx, check_for_pygments, - check_for_nose, check_for_pexpect, - check_for_pyzmq, check_for_readline, - check_for_jinja2, check_for_tornado - ) - print_line() - print_raw("BUILDING IPYTHON") - print_status('python', sys.version) - print_status('platform', sys.platform) - if sys.platform == 'win32': - print_status('Windows version', sys.getwindowsversion()) - - print_raw("") - print_raw("OPTIONAL DEPENDENCIES") - - check_for_sphinx() - check_for_pygments() - check_for_nose() - if os.name == 'posix': - check_for_pexpect() - check_for_pyzmq() - check_for_tornado() - check_for_readline() - check_for_jinja2() +def check_for_readline(): + """Check for GNU readline""" + try: + import gnureadline as readline + except ImportError: + pass + else: + return True + try: + import readline + except ImportError: + return False + else: + if sys.platform == 'darwin' and 'libedit' in readline.__doc__: + print("Ignoring readline linked to libedit", file=sys.stderr) + return False + return True #--------------------------------------------------------------------------- # VCS related From d88f832f06a76968853e3711842aa9f5d2e0d903 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 20 Mar 2015 16:56:32 -0400 Subject: [PATCH 7/7] remove pickleshare from external --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ba61c880..a2887bd74 100755 --- a/setup.py +++ b/setup.py @@ -269,7 +269,7 @@ extras_require['nbconvert'].extend(extras_require['nbformat']) install_requires = [ 'decorator', - 'path.py', # required by pickleshare, remove when pickleshare is added here + 'pickleshare', 'simplegeneric>0.8', ]