From f6061ca275af3d66549b4d72d3aab39ad7966066 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 15:55:28 -0700 Subject: [PATCH 01/24] ColorANSI.py -> utils/coloransi.py and all imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 02aa77a81..094eacf08 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -198,7 +198,7 @@ def make_runners(): # XXX: Shell.py is also ommited because of a bug in the skip_doctest # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ - ['background_jobs.py', 'ColorANSI.py', 'completer.py', 'ConfigLoader.py', + ['background_jobs.py', 'coloransi.py', 'completer.py', 'ConfigLoader.py', 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', From bfd32c129b335a3955e605d0f356dde97d5e2934 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 15:59:42 -0700 Subject: [PATCH 02/24] background_jobs.py => lib/backgroundjob.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 094eacf08..413aaec97 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -198,7 +198,7 @@ def make_runners(): # XXX: Shell.py is also ommited because of a bug in the skip_doctest # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ - ['background_jobs.py', 'coloransi.py', 'completer.py', 'ConfigLoader.py', + ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'ConfigLoader.py', 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', From 6bc203735aede245d920870d71f80c662a0b3307 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 16:12:15 -0700 Subject: [PATCH 03/24] ConfigLoader.py => config/configloader.py and updated all imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 413aaec97..4f2c81d06 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -198,7 +198,7 @@ def make_runners(): # XXX: Shell.py is also ommited because of a bug in the skip_doctest # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ - ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'ConfigLoader.py', + ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', From d0a609940a33c81676a04f3cd10c6efecce68305 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 16:14:57 -0700 Subject: [PATCH 04/24] CrashHandler.py => core/crashhandler.py and updated all imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 4f2c81d06..7c44267ec 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -199,7 +199,7 @@ def make_runners(): # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', - 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', + 'crashhandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', From 8221c8f920743be190191a36f503f41c8ccb93a7 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 16:25:06 -0700 Subject: [PATCH 05/24] Debugger.py => core/debugger.py and updated all imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 7c44267ec..a48ba0a03 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -199,7 +199,7 @@ def make_runners(): # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', - 'crashhandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', + 'crashhandler.py', 'debugger.py', 'deep_reload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', From 32a5e3041dff09d8df629f400aa40de6474a785e Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 16:39:48 -0700 Subject: [PATCH 06/24] =?UTF-8?q?deep=5Freload.py=20=3D=3F=20lib/deepreloa?= =?UTF-8?q?d.py=20and=20imports=20updated.?= --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index a48ba0a03..340e1aa11 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -199,7 +199,7 @@ def make_runners(): # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', - 'crashhandler.py', 'debugger.py', 'deep_reload.py', 'demo.py', + 'crashhandler.py', 'debugger.py', 'deepreload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', From d4c01d040784cb34ecff364cb1566a7de91a99a1 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 17:07:30 -0700 Subject: [PATCH 07/24] FakeModule.py => core/fakemodule.py and updated tests and imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 340e1aa11..12d122ad4 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -200,7 +200,7 @@ def make_runners(): top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', 'crashhandler.py', 'debugger.py', 'deepreload.py', 'demo.py', - 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', + 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'fakemodule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py', From 6f8009d88f9d46bfc0a8d349b05b1621ea049528 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 22:24:01 -0700 Subject: [PATCH 08/24] Logger.py => core/logger.py and updated imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 12d122ad4..2209add62 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -203,7 +203,7 @@ def make_runners(): 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'fakemodule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', - 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py', + 'logger.py', 'macro.py', 'Magic.py', 'OInspect.py', 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', From 84df0f39f7c75e471e6f0698f812f4a4a7488969 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Wed, 1 Jul 2009 22:45:57 -0700 Subject: [PATCH 09/24] Fixing the setup.py script under setuptools and the __init__.py script. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 1c905c4fa..46afbc82e 100755 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ if os.path.exists('MANIFEST'): os.remove('MANIFEST') from distutils.core import setup # Local imports -from IPython.genutils import target_update +from IPython.utils.genutils import target_update from setupbase import ( setup_args, @@ -143,7 +143,7 @@ if 'setuptools' in sys.modules: setuptools_extra_args['zip_safe'] = False setuptools_extra_args['entry_points'] = { 'console_scripts': [ - 'ipython = IPython.ipapi:launch_new_instance', + 'ipython = IPython.core.ipapi:launch_new_instance', 'pycolor = IPython.PyColorize:main', 'ipcontroller = IPython.kernel.scripts.ipcontroller:main', 'ipengine = IPython.kernel.scripts.ipengine:main', From 9e7706b8e8c7bf17f363f847dc50b0adf49cfa7a Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:12:10 -0700 Subject: [PATCH 10/24] irunner.py => lib/irunner.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 2209add62..c9b032bff 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -99,7 +99,7 @@ if not os.name == 'posix': EXCLUDE.append(pjoin('IPython', 'platutils_posix')) if not have_pexpect: - EXCLUDE.append(pjoin('IPython', 'irunner')) + EXCLUDE.append(pjoin('IPython', 'lib', 'irunner')) # This is needed for the reg-exp to match on win32 in the ipdoctest plugin. if sys.platform == 'win32': From 93ff33a755f6abd219bf19eef436ce3073244195 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:14:59 -0700 Subject: [PATCH 11/24] Magic.py => core/magic.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index c9b032bff..079a1a312 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -203,7 +203,7 @@ def make_runners(): 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'fakemodule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', - 'logger.py', 'macro.py', 'Magic.py', 'OInspect.py', + 'logger.py', 'macro.py', 'magic.py', 'OInspect.py', 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', From 96372896a0abf94a1b4269e8514f1c0437754415 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:19:02 -0700 Subject: [PATCH 12/24] OInspect.py => core/oinspect.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 079a1a312..f70358150 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -203,7 +203,7 @@ def make_runners(): 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'fakemodule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', - 'logger.py', 'macro.py', 'magic.py', 'OInspect.py', + 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', From a86437a2723e54d1b36c1b1616f9a92306ba7809 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:21:53 -0700 Subject: [PATCH 13/24] OutputTrap.py => core/outputtrap.py and updated imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index f70358150..b866cf566 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -204,7 +204,7 @@ def make_runners(): 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', - 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', + 'outputtrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', From d24aa6729deef6b272348990849a0ad156d0cf3c Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:26:42 -0700 Subject: [PATCH 14/24] All platutils modules to utils, moved tests and updated imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index b866cf566..f82975969 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -30,7 +30,7 @@ import warnings import nose.plugins.builtin from nose.core import TestProgram -from IPython.platutils import find_cmd +from IPython.utils.platutils import find_cmd from IPython.testing.plugin.ipdoctest import IPythonDoctest pjoin = path.join From c2b67757f4d23913b6de2c53b31d71eef1ffd86f Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:35:38 -0700 Subject: [PATCH 15/24] Prompts.py => core/prompts.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index f82975969..e82876fcf 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -204,7 +204,7 @@ def make_runners(): 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', - 'outputtrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', + 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', From 7c088ae84ac88c8e48a6eb00a1c9baec02e33275 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 09:59:43 -0700 Subject: [PATCH 16/24] Release.py => core/release.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index e82876fcf..a53683127 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -205,7 +205,7 @@ def make_runners(): 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', - 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', + 'PyColorize.py', 'release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', # See note above for why this is skipped From a522e6f6fde767f1055597b7b2bb7c6b506c8852 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 10:35:51 -0700 Subject: [PATCH 17/24] Shell.py => core/shell.py and imports updated. --- IPython/testing/iptest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index a53683127..5bf579302 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -195,7 +195,7 @@ def make_runners(): """ # This omits additional top-level modules that should not be doctested. - # XXX: Shell.py is also ommited because of a bug in the skip_doctest + # XXX: shell.py is also ommited because of a bug in the skip_doctest # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', @@ -209,7 +209,7 @@ def make_runners(): 'shellglobals.py', 'strdispatch.py', 'twshell.py', 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', # See note above for why this is skipped - # 'Shell.py', + # 'shell.py', 'winconsole.py'] if have_pexpect: From 8bdec3ecc86f60491d927dfc0aa42d807217939b Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 10:46:01 -0700 Subject: [PATCH 18/24] ultraTB.py => core/ultratb.py and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 5bf579302..420f03a23 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -207,7 +207,7 @@ def make_runners(): 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', 'PyColorize.py', 'release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', - 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', + 'ultratb.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', # See note above for why this is skipped # 'shell.py', 'winconsole.py'] From 629dabdeab33e6e43ebc147bd273cc3da2218691 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 11:32:19 -0700 Subject: [PATCH 19/24] upgrade_dir.py => utils/upgradedir.py and updated imports. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 420f03a23..1a6624b92 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -207,7 +207,7 @@ def make_runners(): 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', 'PyColorize.py', 'release.py', 'rlineimpl.py', 'shadowns.py', 'shellglobals.py', 'strdispatch.py', 'twshell.py', - 'ultratb.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', + 'ultratb.py', 'upgradedir.py', 'usage.py', 'wildcard.py', # See note above for why this is skipped # 'shell.py', 'winconsole.py'] From f53e35c98b767c47e8e5135c1e3ea476f6a93d7a Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 12:04:09 -0700 Subject: [PATCH 20/24] UserConfig => config/userconfig and imports updated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 1a6624b92..954e638a0 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -224,7 +224,7 @@ def make_runners(): # These are tested by nose, so skip IPython.kernel top_pack = ['config','Extensions','frontend', - 'testing','tests','tools','UserConfig'] + 'testing','tests','tools','userconfig'] if have_wx: top_pack.append('gui') From 7b495ced75e917bcfe3d70dba9f51c46613f17eb Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 14:35:36 -0700 Subject: [PATCH 21/24] Fixing installation related issues. --- setup.py | 11 ++++---- setupbase.py | 73 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 51 insertions(+), 33 deletions(-) diff --git a/setup.py b/setup.py index 46afbc82e..f5727290d 100755 --- a/setup.py +++ b/setup.py @@ -29,7 +29,6 @@ if os.path.exists('MANIFEST'): os.remove('MANIFEST') from distutils.core import setup -# Local imports from IPython.utils.genutils import target_update from setupbase import ( @@ -42,6 +41,7 @@ from setupbase import ( ) isfile = os.path.isfile +pjoin = os.path.join #------------------------------------------------------------------------------- # Handle OS specific things @@ -99,7 +99,7 @@ if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): # First, compute all the dependencies that can force us to rebuild the # docs. Start with the main release file that contains metadata - docdeps = ['IPython/Release.py'] + docdeps = ['IPython/core/release.py'] # Inculde all the reST sources pjoin = os.path.join for dirpath,dirnames,filenames in os.walk('docs/source'): @@ -144,12 +144,13 @@ if 'setuptools' in sys.modules: setuptools_extra_args['entry_points'] = { 'console_scripts': [ 'ipython = IPython.core.ipapi:launch_new_instance', - 'pycolor = IPython.PyColorize:main', + 'pycolor = IPython.utils.PyColorize:main', 'ipcontroller = IPython.kernel.scripts.ipcontroller:main', 'ipengine = IPython.kernel.scripts.ipengine:main', 'ipcluster = IPython.kernel.scripts.ipcluster:main', 'ipythonx = IPython.frontend.wx.ipythonx:main', 'iptest = IPython.testing.iptest:main', + 'irunner = IPython.lib.irunner:main' ] } setup_args['extras_require'] = dict( @@ -166,9 +167,9 @@ if 'setuptools' in sys.modules: scripts = [] else: # package_data of setuptools was introduced to distutils in 2.4 - cfgfiles = filter(isfile, glob('IPython/UserConfig/*')) + cfgfiles = filter(isfile, glob(pjoin('IPython','config','userconfig'))) if sys.version_info < (2,4): - data_files.append(('lib', 'IPython/UserConfig', cfgfiles)) + data_files.append(('lib', pjoin('IPython','config','userconfig'), cfgfiles)) # If we are running 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. diff --git a/setupbase.py b/setupbase.py index 9c00a35d3..73c3dc3a6 100644 --- a/setupbase.py +++ b/setupbase.py @@ -58,7 +58,7 @@ def file_doesnt_endwith(test,endings): #--------------------------------------------------------------------------- # Release.py contains version, authors, license, url, keywords, etc. -execfile(pjoin('IPython','Release.py')) +execfile(pjoin('IPython','core','release.py')) # Create a dict with the basic information # This dict is eventually passed to setup after additional keys are added. @@ -104,21 +104,30 @@ def find_packages(): """ packages = ['IPython'] add_package(packages, 'config', tests=True) + add_package(packages, 'config.userconfig') + add_package(packages, 'core', tests=True) + add_package(packages, 'deathrow', tests=True) add_package(packages , 'Extensions') add_package(packages, 'external') - add_package(packages, 'gui') - add_package(packages, 'gui.wx') add_package(packages, 'frontend', tests=True) + # Don't include the cocoa frontend for now as it is not stable + if sys.platform == 'darwin' and False: + add_package(packages, 'frontend.cocoa', tests=True, others=['plugin']) + add_package(packages, 'frontend.cocoa.examples') + add_package(packages, 'frontend.cocoa.examples.IPython1Sandbox') + add_package(packages, 'frontend.cocoa.examples.IPython1Sandbox.English.lproj') add_package(packages, 'frontend.process') add_package(packages, 'frontend.wx') - add_package(packages, 'frontend.cocoa', tests=True) + add_package(packages, 'gui') + add_package(packages, 'gui.wx') add_package(packages, 'kernel', config=True, tests=True, scripts=True) add_package(packages, 'kernel.core', config=True, tests=True) + add_package(packages, 'lib', tests=True) + add_package(packages, 'quarantine', tests=True) + add_package(packages, 'scripts') add_package(packages, 'testing', tests=True) - add_package(packages, 'tests') add_package(packages, 'testing.plugin', tests=False) - add_package(packages, 'tools', tests=True) - add_package(packages, 'UserConfig') + add_package(packages, 'utils', tests=True) return packages #--------------------------------------------------------------------------- @@ -132,8 +141,7 @@ def find_package_data(): # This is not enough for these things to appear in an sdist. # We need to muck with the MANIFEST to get this to work package_data = { - 'IPython.UserConfig' : ['*'], - 'IPython.tools.tests' : ['*.txt'], + 'IPython.config.userconfig' : ['*'], 'IPython.testing' : ['*.txt'] } return package_data @@ -187,17 +195,24 @@ def find_data_files(): Most of these are docs. """ - docdirbase = 'share/doc/ipython' - manpagebase = 'share/man/man1' - + docdirbase = pjoin('share', 'doc', 'ipython') + manpagebase = pjoin('share', 'man', 'man1') + # Simple file lists can be made by hand - manpages = filter(isfile, glob('docs/man/*.1.gz')) - igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*')) + manpages = filter(isfile, glob(pjoin('docs','man','*.1.gz'))) + igridhelpfiles = filter(isfile, glob(pjoin('IPython','Extensions','igrid_help.*'))) # For nested structures, use the utility above - example_files = make_dir_struct('data','docs/examples', - pjoin(docdirbase,'examples')) - manual_files = make_dir_struct('data','docs/dist',pjoin(docdirbase,'manual')) + example_files = make_dir_struct( + 'data', + pjoin('docs','examples'), + pjoin(docdirbase,'examples') + ) + manual_files = make_dir_struct( + 'data', + pjoin('docs','dist'), + pjoin(docdirbase,'manual') + ) # And assemble the entire output list data_files = [ ('data',manpagebase, manpages), @@ -220,16 +235,18 @@ def find_scripts(): """ Find IPython's scripts. """ - scripts = ['IPython/kernel/scripts/ipengine', - 'IPython/kernel/scripts/ipcontroller', - 'IPython/kernel/scripts/ipcluster', - 'scripts/ipython', - 'scripts/ipythonx', - 'scripts/ipython-wx', - 'scripts/pycolor', - 'scripts/irunner', - 'scripts/iptest', - ] + kernel_scripts = pjoin('IPython','kernel','scripts') + main_scripts = pjoin('IPython','scripts') + scripts = [pjoin(kernel_scripts, 'ipengine'), + pjoin(kernel_scripts, 'ipcontroller'), + pjoin(kernel_scripts, 'ipcluster'), + pjoin(main_scripts, 'ipython'), + pjoin(main_scripts, 'ipythonx'), + pjoin(main_scripts, 'ipython-wx'), + pjoin(main_scripts, 'pycolor'), + pjoin(main_scripts, 'irunner'), + pjoin(main_scripts, 'iptest') + ] # Script to be run by the windows binary installer after the default setup # routine, to add shortcuts and similar windows-only things. Windows @@ -239,7 +256,7 @@ def find_scripts(): if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv): print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting." sys.exit(1) - scripts.append('scripts/ipython_win_post_install.py') + scripts.append(pjoin(main_scripts,'ipython_win_post_install.py')) return scripts From f50040feecb76cc19208fca7c1b3da117d54f72f Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 2 Jul 2009 15:59:26 -0700 Subject: [PATCH 22/24] Fixing a few bugs to get the win32 installer working again. --- setupbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setupbase.py b/setupbase.py index 73c3dc3a6..0d3d394f8 100644 --- a/setupbase.py +++ b/setupbase.py @@ -256,7 +256,7 @@ def find_scripts(): if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv): print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting." sys.exit(1) - scripts.append(pjoin(main_scripts,'ipython_win_post_install.py')) + scripts.append(pjoin('scripts','ipython_win_post_install.py')) return scripts From 6221939722edaf3b76e01da3cfa3e0e5f637f115 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Mon, 20 Jul 2009 15:16:34 -0700 Subject: [PATCH 23/24] Renaming Extensions=>extensions in code and imports. --- IPython/testing/iptest.py | 16 ++++++++-------- setupbase.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 954e638a0..d793ca223 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -64,11 +64,11 @@ EXCLUDE = [pjoin('IPython', 'external'), pjoin('IPython', 'frontend', 'process', 'winprocess.py'), pjoin('IPython_doctest_plugin'), pjoin('IPython', 'Gnuplot'), - pjoin('IPython', 'Extensions', 'ipy_'), - pjoin('IPython', 'Extensions', 'clearcmd'), - pjoin('IPython', 'Extensions', 'PhysicalQInteractive'), - pjoin('IPython', 'Extensions', 'scitedirector'), - pjoin('IPython', 'Extensions', 'numeric_formats'), + pjoin('IPython', 'extensions', 'ipy_'), + pjoin('IPython', 'extensions', 'clearcmd'), + pjoin('IPython', 'extensions', 'PhysicalQInteractive'), + pjoin('IPython', 'extensions', 'scitedirector'), + pjoin('IPython', 'extensions', 'numeric_formats'), pjoin('IPython', 'testing', 'attic'), pjoin('IPython', 'testing', 'tutils'), pjoin('IPython', 'testing', 'tools'), @@ -76,7 +76,7 @@ EXCLUDE = [pjoin('IPython', 'external'), ] if not have_wx: - EXCLUDE.append(pjoin('IPython', 'Extensions', 'igrid')) + EXCLUDE.append(pjoin('IPython', 'extensions', 'igrid')) EXCLUDE.append(pjoin('IPython', 'gui')) EXCLUDE.append(pjoin('IPython', 'frontend', 'wx')) @@ -84,7 +84,7 @@ if not have_objc: EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa')) if not have_curses: - EXCLUDE.append(pjoin('IPython', 'Extensions', 'ibrowse')) + EXCLUDE.append(pjoin('IPython', 'extensions', 'ibrowse')) if not sys.platform == 'win32': EXCLUDE.append(pjoin('IPython', 'platutils_win32')) @@ -223,7 +223,7 @@ def make_runners(): top_mod.append('platutils_dummy.py') # These are tested by nose, so skip IPython.kernel - top_pack = ['config','Extensions','frontend', + top_pack = ['config','extensions','frontend', 'testing','tests','tools','userconfig'] if have_wx: diff --git a/setupbase.py b/setupbase.py index 0d3d394f8..972cafc13 100644 --- a/setupbase.py +++ b/setupbase.py @@ -107,7 +107,7 @@ def find_packages(): add_package(packages, 'config.userconfig') add_package(packages, 'core', tests=True) add_package(packages, 'deathrow', tests=True) - add_package(packages , 'Extensions') + add_package(packages , 'extensions') add_package(packages, 'external') add_package(packages, 'frontend', tests=True) # Don't include the cocoa frontend for now as it is not stable @@ -200,7 +200,7 @@ def find_data_files(): # Simple file lists can be made by hand manpages = filter(isfile, glob(pjoin('docs','man','*.1.gz'))) - igridhelpfiles = filter(isfile, glob(pjoin('IPython','Extensions','igrid_help.*'))) + igridhelpfiles = filter(isfile, glob(pjoin('IPython','extensions','igrid_help.*'))) # For nested structures, use the utility above example_files = make_dir_struct( From 58e345c261501fc1282d9d8830e0d3e15c709a25 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Mon, 27 Jul 2009 15:38:27 -0700 Subject: [PATCH 24/24] Refactored iptest.py to work with new package org. In the process I had to fix 2 small bugs to get all the tests passing. --- IPython/testing/iptest.py | 161 +++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 91 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index d793ca223..44b732ece 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -56,55 +56,60 @@ have_foolscap = test_for('foolscap') have_objc = test_for('objc') have_pexpect = test_for('pexpect') -# For the IPythonDoctest plugin, we need to exclude certain patterns that cause -# testing problems. We should strive to minimize the number of skipped -# modules, since this means untested code. As the testing machinery -# solidifies, this list should eventually become empty. -EXCLUDE = [pjoin('IPython', 'external'), - pjoin('IPython', 'frontend', 'process', 'winprocess.py'), - pjoin('IPython_doctest_plugin'), - pjoin('IPython', 'Gnuplot'), - pjoin('IPython', 'extensions', 'ipy_'), - pjoin('IPython', 'extensions', 'clearcmd'), - pjoin('IPython', 'extensions', 'PhysicalQInteractive'), - pjoin('IPython', 'extensions', 'scitedirector'), - pjoin('IPython', 'extensions', 'numeric_formats'), - pjoin('IPython', 'testing', 'attic'), - pjoin('IPython', 'testing', 'tutils'), - pjoin('IPython', 'testing', 'tools'), - pjoin('IPython', 'testing', 'mkdoctests') - ] - -if not have_wx: - EXCLUDE.append(pjoin('IPython', 'extensions', 'igrid')) - EXCLUDE.append(pjoin('IPython', 'gui')) - EXCLUDE.append(pjoin('IPython', 'frontend', 'wx')) - -if not have_objc: - EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa')) - -if not have_curses: - EXCLUDE.append(pjoin('IPython', 'extensions', 'ibrowse')) - -if not sys.platform == 'win32': - EXCLUDE.append(pjoin('IPython', 'platutils_win32')) - -# These have to be skipped on win32 because the use echo, rm, cd, etc. -# See ticket https://bugs.launchpad.net/bugs/366982 -if sys.platform == 'win32': - EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip')) - EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'dtexample')) - -if not os.name == 'posix': - EXCLUDE.append(pjoin('IPython', 'platutils_posix')) - -if not have_pexpect: - EXCLUDE.append(pjoin('IPython', 'lib', 'irunner')) - -# This is needed for the reg-exp to match on win32 in the ipdoctest plugin. -if sys.platform == 'win32': - EXCLUDE = [s.replace('\\','\\\\') for s in EXCLUDE] +def make_exclude(): + + # For the IPythonDoctest plugin, we need to exclude certain patterns that cause + # testing problems. We should strive to minimize the number of skipped + # modules, since this means untested code. As the testing machinery + # solidifies, this list should eventually become empty. + EXCLUDE = [pjoin('IPython', 'external'), + pjoin('IPython', 'frontend', 'process', 'winprocess.py'), + pjoin('IPython_doctest_plugin'), + pjoin('IPython', 'extensions', 'ipy_'), + pjoin('IPython', 'extensions', 'clearcmd'), + pjoin('IPython', 'extensions', 'PhysicalQInteractive'), + pjoin('IPython', 'extensions', 'scitedirector'), + pjoin('IPython', 'extensions', 'numeric_formats'), + pjoin('IPython', 'testing', 'attic'), + pjoin('IPython', 'testing', 'tools'), + pjoin('IPython', 'testing', 'mkdoctests') + ] + + if not have_wx: + EXCLUDE.append(pjoin('IPython', 'extensions', 'igrid')) + EXCLUDE.append(pjoin('IPython', 'gui')) + EXCLUDE.append(pjoin('IPython', 'frontend', 'wx')) + + if not have_objc: + EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa')) + + if not have_curses: + EXCLUDE.append(pjoin('IPython', 'extensions', 'ibrowse')) + + if not sys.platform == 'win32': + EXCLUDE.append(pjoin('IPython', 'utils', 'platutils_win32')) + + # These have to be skipped on win32 because the use echo, rm, cd, etc. + # See ticket https://bugs.launchpad.net/bugs/366982 + if sys.platform == 'win32': + EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip')) + EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'dtexample')) + + if not os.name == 'posix': + EXCLUDE.append(pjoin('IPython', 'utils', 'platutils_posix')) + + if not have_pexpect: + EXCLUDE.append(pjoin('IPython', 'scripts', 'irunner')) + + # Skip shell always because of a bug in FakeModule. + EXCLUDE.append(pjoin('IPython', 'core', 'shell')) + + # This is needed for the reg-exp to match on win32 in the ipdoctest plugin. + if sys.platform == 'win32': + EXCLUDE = [s.replace('\\','\\\\') for s in EXCLUDE] + + return EXCLUDE #----------------------------------------------------------------------------- # Functions and classes @@ -155,13 +160,12 @@ def run_iptest(): # Construct list of plugins, omitting the existing doctest plugin, which # ours replaces (and extends). + EXCLUDE = make_exclude() plugins = [IPythonDoctest(EXCLUDE)] for p in nose.plugins.builtin.plugins: plug = p() if plug.name == 'doctest': continue - - #print '*** adding plugin:',plug.name # dbg plugins.append(plug) TestProgram(argv=argv,plugins=plugins) @@ -191,55 +195,28 @@ class IPTester(object): def make_runners(): - """Define the modules and packages that need to be tested. + """Define the top-level packages that need to be tested. """ - - # This omits additional top-level modules that should not be doctested. - # XXX: shell.py is also ommited because of a bug in the skip_doctest - # decorator. See ticket https://bugs.launchpad.net/bugs/366209 - top_mod = \ - ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', - 'crashhandler.py', 'debugger.py', 'deepreload.py', 'demo.py', - 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'fakemodule.py', - 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', - 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', - 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', - 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', - 'PyColorize.py', 'release.py', 'rlineimpl.py', 'shadowns.py', - 'shellglobals.py', 'strdispatch.py', 'twshell.py', - 'ultratb.py', 'upgradedir.py', 'usage.py', 'wildcard.py', - # See note above for why this is skipped - # 'shell.py', - 'winconsole.py'] - - if have_pexpect: - top_mod.append('irunner.py') - - if sys.platform == 'win32': - top_mod.append('platutils_win32.py') - elif os.name == 'posix': - top_mod.append('platutils_posix.py') - else: - top_mod.append('platutils_dummy.py') - # These are tested by nose, so skip IPython.kernel - top_pack = ['config','extensions','frontend', - 'testing','tests','tools','userconfig'] + nose_packages = ['config', 'core', 'extensions', + 'frontend', 'lib', 'quarantine', + 'scripts', 'testing', 'utils'] + trial_packages = ['kernel'] if have_wx: - top_pack.append('gui') + nose_packages.append('gui') - modules = ['IPython.%s' % m[:-3] for m in top_mod ] - packages = ['IPython.%s' % m for m in top_pack ] + nose_packages = ['IPython.%s' % m for m in nose_packages ] + trial_packages = ['IPython.%s' % m for m in trial_packages ] # Make runners - runners = dict(zip(top_pack, [IPTester(params=v) for v in packages])) + runners = dict() - # Test IPython.kernel using trial if twisted is installed + nose_runners = dict(zip(nose_packages, [IPTester(params=v) for v in nose_packages])) if have_zi and have_twisted and have_foolscap: - runners['trial'] = IPTester('trial',['IPython']) - - runners['modules'] = IPTester(params=modules) + trial_runners = dict(zip(trial_packages, [IPTester('trial',params=v) for v in trial_packages])) + runners.update(nose_runners) + runners.update(trial_runners) return runners @@ -252,13 +229,15 @@ def run_iptestall(): and packages of IPython to be tested each in their own subprocess using nose or twisted.trial appropriately. """ + runners = make_runners() + # Run all test runners, tracking execution time failed = {} t_start = time.time() for name,runner in runners.iteritems(): print '*'*77 - print 'IPython test set:',name + print 'IPython test set:', name res = runner.run() if res: failed[name] = res