Esempio n. 1
0
"""Make sure we can import NumPy
"""
import sys, os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath))  # path to cached_import.py
from cached_import import finder
sys.meta_path.append(finder(skip_checks=False))
import numpy
# What did we import?
print numpy.__file__
print numpy.__version__
print getattr(numpy, "__loader__", None)
Esempio n. 2
0
inside dir1, execute "python setup.py build_ext --inplace" to build these
modules.

This test just checks the __file__ and __loader__ attributes of a module, not
whether the loaded modules function correctly.
"""

import sys, os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath))  # path to cached_import.py
dir1 = os.path.join(scriptpath, "dir1")
dir2 = os.path.join(scriptpath, "dir2")
dir3 = os.path.join(scriptpath, "dir3")
sys.path.append(dir1)
from cached_import import finder
my_importer = finder()
sys.meta_path.append(my_importer)

import f1
import f2
import f3
sys.path.insert(0, dir2)
import f4
sys.path.append(dir3)
import f5
import f6
import f7
from f8 import f9


def check(modules):
Esempio n. 3
0
"""Make sure we can import NumPy
"""
import sys,os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath)) # path to cached_import.py
from cached_import import finder
sys.meta_path.append(finder())
import numpy
# What did we import?
print numpy.__file__
print numpy.__version__
print getattr(numpy,"__loader__",None)
Esempio n. 4
0
inside dir1, execute "python setup.py build_ext --inplace" to build these
modules.

This test just checks the __file__ and __loader__ attributes of a module, not
whether the loaded modules function correctly.
"""

import sys, os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath))  # path to cached_import.py
dir1 = os.path.join(scriptpath, "dir1")
dir2 = os.path.join(scriptpath, "dir2")
dir3 = os.path.join(scriptpath, "dir3")
sys.path.append(dir1)
from cached_import import finder
my_importer = finder(skip_checks=False)
sys.meta_path.append(my_importer)

import f1
import f2
import f3
sys.path.insert(0, dir2)
import f4
sys.path.append(dir3)
import f5
import f6
import f7
from f8 import f9


def check(modules):
Esempio n. 5
0
"""Make sure we can import NumPy
"""
import sys,os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath)) # path to cached_import.py
from cached_import import finder
sys.meta_path.append(finder(skip_checks=False))
import numpy
# What did we import?
print numpy.__file__
print numpy.__version__
print getattr(numpy,"__loader__",None)

Esempio n. 6
0
"""Make sure we can import NumPy
"""
import sys, os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath))  # path to cached_import.py
from cached_import import finder
sys.meta_path.append(finder())
import numpy
# What did we import?
print numpy.__file__
print numpy.__version__
print getattr(numpy, "__loader__", None)
Esempio n. 7
0
inside dir1, execute "python setup.py build_ext --inplace" to build these
modules.

This test just checks the __file__ and __loader__ attributes of a module, not
whether the loaded modules function correctly.
"""

import sys,os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath)) # path to cached_import.py
dir1 = os.path.join(scriptpath,"dir1")
dir2 = os.path.join(scriptpath,"dir2")
dir3 = os.path.join(scriptpath,"dir3")
sys.path.append(dir1)
from cached_import import finder
my_importer = finder(skip_checks=False)
sys.meta_path.append(my_importer)

import f1
import f2
import f3
sys.path.insert(0,dir2)
import f4
sys.path.append(dir3)
import f5
import f6
import f7
from f8 import f9

def check(modules):
    # For Python source files, either the source or bytecode file
Esempio n. 8
0
inside dir1, execute "python setup.py build_ext --inplace" to build these
modules.

This test just checks the __file__ and __loader__ attributes of a module, not
whether the loaded modules function correctly.
"""

import sys,os
scriptpath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(scriptpath)) # path to cached_import.py
dir1 = os.path.join(scriptpath,"dir1")
dir2 = os.path.join(scriptpath,"dir2")
dir3 = os.path.join(scriptpath,"dir3")
sys.path.append(dir1)
from cached_import import finder
my_importer = finder()
sys.meta_path.append(my_importer)

import f1
import f2
import f3
sys.path.insert(0,dir2)
import f4
sys.path.append(dir3)
import f5
import f6
import f7
from f8 import f9

def check(modules):
    # For Python source files, either the source or bytecode file