Skip to content
Browse files

Unbundle of all external modules.

Move all libraries in external into subfolders and place a custom
__init__.py into each of them. This way the system installed ones are
tried first, before falling back to the bundled ones.

Now every distribution can properly depend on the upstream library.
(e.g. bundled libraries are not allowed in fedora)

Signed-off-by: Toshio Ernie Kuratomi <toshio@fedoraproject.org>
Signed-off-by: Thomas Spura <tomspur@fedoraproject.org>
  • Loading branch information...
1 parent 9e2a3f4 commit 261328d59cbbf66646e4ea137bb1211d1f4dccf4 @tomspur committed Jun 19, 2010
View
0 IPython/external/Itpl.py → IPython/external/Itpl/_Itpl.py
File renamed without changes.
View
4 IPython/external/Itpl/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from Itpl import *
+except ImportError:
+ from _Itpl import *
View
12 IPython/external/argparse/__init__.py
@@ -0,0 +1,12 @@
+try:
+ import argparse
+ # Workaround an argparse bug, FIXED in argparse 1.1.0
+ if 'RawTextHelpFormatterArgumentDefaultsHelpFormatter' in argparse.__all__:
+ import itertools
+ argparse.__all__ = list(itertools.chain( [i for i in argparse.__all__
+ if i != 'RawTextHelpFormatterArgumentDefaultsHelpFormatter'],
+ ['RawTextHelpFormatter', 'ArgumentDefaultsHelpFormatter']))
+ argparse.__all__.append('SUPPRESS')
+ from argparse import *
+except ImportError:
+ from _argparse import *
View
0 IPython/external/argparse.py → IPython/external/argparse/_argparse.py
File renamed without changes.
View
4 IPython/external/configobj/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from configobj import *
+except ImportError:
+ from _configobj import *
View
0 IPython/external/configobj.py → IPython/external/configobj/_configobj.py
File renamed without changes.
View
8 IPython/external/decorator/__init__.py
@@ -0,0 +1,8 @@
+try:
+ from decorator import *
+ from decorator import getinfo, new_wrapper
+ # the following funcion is deprecated so using the python own one
+ from functools import update_wrapper
+except ImportError:
+ from _decorator import *
+ from _decorator import getinfo, update_wrapper, new_wrapper
View
0 IPython/external/decorator.py → IPython/external/decorator/_decorator.py
File renamed without changes.
View
4 IPython/external/decorators/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from numpy.testing.decorators import *
+except ImportError:
+ from _decorators.py import *
View
0 IPython/external/decorators.py → IPython/external/decorators/_decorators.py
File renamed without changes.
View
0 IPython/external/_numpy_testing_utils.py → ...ternal/decorators/_numpy_testing_utils.py
File renamed without changes.
View
4 IPython/external/guid/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from guid import *
+except ImportError:
+ from _guid import *
View
0 IPython/external/guid.py → IPython/external/guid/_guid.py
File renamed without changes.
View
4 IPython/external/mglob/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from mglob import *
+except ImportError:
+ from _mglob import *
View
2 IPython/external/mglob.py → IPython/external/mglob/_mglob.py 100755 → 100644
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
r""" mglob - enhanced file list expansion module
Use as stand-alone utility (for xargs, `backticks` etc.),
View
4 IPython/external/path/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from path import *
+except ImportError:
+ from _path import *
View
0 IPython/external/path.py → IPython/external/path/_path.py
File renamed without changes.
View
4 IPython/external/pretty/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from pretty import *
+except ImportError:
+ from _pretty import *
View
0 IPython/external/pretty.py → IPython/external/pretty/_pretty.py
File renamed without changes.
View
4 IPython/external/pyparsing/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from pyparsing import *
+except ImportError:
+ from _pyparsing import *
View
0 IPython/external/pyparsing.py → IPython/external/pyparsing/_pyparsing.py
File renamed without changes.
View
4 IPython/external/simplegeneric/__init__.py
@@ -0,0 +1,4 @@
+try:
+ from simplegeneric import *
+except ImportError:
+ from _simplegeneric import *
View
0 IPython/external/simplegeneric.py → .../external/simplegeneric/_simplegeneric.py
File renamed without changes.
View
8 IPython/external/validate/__init__.py
@@ -0,0 +1,8 @@
+try:
+ import validate
+ if '__docformat__' in validate.__all__ and validate.__version__.split('.') >= ['1', '0', '1']:
+ # __docformat__ was removed in 1.0.1 but
+ validate.__all__ = [i for i in validate.__all__ if i != '__docformat__']
+ from validate import *
+except ImportError:
+ from _validate import *
View
0 IPython/external/validate.py → IPython/external/validate/_validate.py
File renamed without changes.
View
12 setupbase.py
@@ -108,6 +108,18 @@ def find_packages():
add_package(packages, 'deathrow', tests=True)
add_package(packages, 'extensions')
add_package(packages, 'external')
+ add_package(packages, 'external.argparse')
+ add_package(packages, 'external.configobj')
+ add_package(packages, 'external.decorator')
+ add_package(packages, 'external.decorators')
+ add_package(packages, 'external.guid')
+ add_package(packages, 'external.Itpl')
+ add_package(packages, 'external.mglob')
+ add_package(packages, 'external.path')
+ add_package(packages, 'external.pretty')
+ add_package(packages, 'external.pyparsing')
+ add_package(packages, 'external.simplegeneric')
+ add_package(packages, 'external.validate')
add_package(packages, 'frontend')
add_package(packages, 'frontend.qt')
add_package(packages, 'frontend.qt.console', tests=True)

0 comments on commit 261328d

Please sign in to comment.
Something went wrong with that request. Please try again.