Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(41)  |  Call(39)  |  Derive(0)  |  Import(2)

src/m/o/modulegraph-0.11.1/modulegraph/find_modules.py   modulegraph(Download)
def find_needed_modules(mf=None, scripts=(), includes=(), packages=(), warn=warnings.warn):
    if mf is None:
        mf = modulegraph.ModuleGraph()
    # feed Modulefinder with everything, and return it.
 
    plat_prepare(includes, packages, excludes)
    mf = modulegraph.ModuleGraph(
        path=path,
        excludes=(excludes - includes),
        implies=get_implies(),

src/p/y/PyInstaller-2.1/PyInstaller/build.py   PyInstaller(Download)
        Rather try use a module for that than trying to fix current implementation.
        """
        from modulegraph.modulegraph import ModuleGraph
        from modulegraph.find_modules import get_implies, find_needed_modules
        from PyInstaller import hooks
        # TODO resolve DLL/so/dylib dependencies.
        graph = ModuleGraph(
            path=[_init_code_path] + sys.path,
            implies=collect_implies(),
            debug=0)

src/p/y/pyinstaller-HEAD/PyInstaller/build.py   pyinstaller(Download)
        Rather try use a module for that than trying to fix current implementation.
        """
        from modulegraph.modulegraph import ModuleGraph
        from modulegraph.find_modules import get_implies, find_needed_modules
        from PyInstaller import hooks
        # TODO resolve DLL/so/dylib dependencies.
        graph = ModuleGraph(
            path=[_init_code_path] + sys.path,
            implies=collect_implies(),
            debug=0)

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_modulegraph.py   modulegraph(Download)
    def test_constructor(self):
        o = modulegraph.ModuleGraph()
        self.assertTrue(o.path is sys.path)
        self.assertEqual(o.lazynodes, {})
        self.assertEqual(o.replace_paths, ())
 
        g = Graph.Graph()
        o = modulegraph.ModuleGraph(['a', 'b', 'c'], ['modA'], [
                ('fromA', 'toB'), ('fromC', 'toD')],
                {
    def test_calc_setuptools_nspackages(self):
        stdlib = [ fn for fn in sys.path if fn.startswith(sys.prefix) and 'site-packages' not in fn ]
        for subdir in [ nm for nm in os.listdir(TESTDATA) if nm != 'src' ]:
            graph = modulegraph.ModuleGraph(path=[
                    os.path.join(TESTDATA, subdir, "parent"),
    def testImpliedReference(self):
        graph = modulegraph.ModuleGraph()
 
        record = []
        def import_hook(*args):
    def test_run_script(self):
        script = os.path.join(os.path.dirname(TESTDATA), 'script')
 
        graph = modulegraph.ModuleGraph()
        master = graph.createNode(modulegraph.Node, 'root')

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_implies.py   modulegraph(Download)
 
        # First check that 'syslog' isn't accidently in the graph:
        mg = modulegraph.ModuleGraph(path=[root]+sys.path)
        mg.run_script(os.path.join(root, 'script.py'))
        node = mg.findNode('mod')
        # Now check that adding an implied dependency actually adds
        # 'syslog' to the graph:
        mg = modulegraph.ModuleGraph(path=[root]+sys.path, implies={
            'mod': ['syslog']})
        self.assertEqual(node, None)
 
        # First check that 'syslog' isn't accidently in the graph:
        mg = modulegraph.ModuleGraph(path=[root]+sys.path)
        mg.run_script(os.path.join(root, 'script.py'))
        node = mg.findNode('mod')
        # Now check that adding an implied dependency actually adds
        # 'syslog' to the graph:
        mg = modulegraph.ModuleGraph(path=[root]+sys.path, implies={
            'pkg.relative': ['syslog']})
        node = mg.findNode('syslog')

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_imports.py   modulegraph(Download)
    def setUp(self):
        root = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                'testpkg-relimport')
        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
    def setUp(self):
        root = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                'testpkg-regr1')
        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
                'nosuchdirectory')
        try:
            mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
        except os.error:
            self.fail('modulegraph initialiser raises os.error')
    def setUp(self):
        root = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                'testpkg-regr2')
        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
    def setUp(self):
        root = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                'testpkg-regr3')
        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_pep420_nspkg.py   modulegraph(Download)
        def setUp(self):
            self.mf = modulegraph.ModuleGraph(path=[
                    os.path.join(gSrcDir, 'path1'),
                    os.path.join(gSrcDir, 'path2'),
                ] + sys.path)
        def setUp(self):
            self.mf = modulegraph.ModuleGraph(path=[
                    os.path.join(gSrcDir, 'path1'),
                    os.path.join(gSrcDir, 'path2'),
                ] + sys.path)

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_setuptools_nspkg.py   modulegraph(Download)
        self.assertEqual(exit, 0)
 
        self.mf = modulegraph.ModuleGraph(path=[ test_dir ] + sys.path)
 
    def tearDown(self):

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_relimport2.py   modulegraph(Download)
    def setUp(self):
        self.root = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                'testpkg-relimport2')
        self.mf = modulegraph.ModuleGraph(path=[ self.root ] + sys.path)

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_import_from_init.py   modulegraph(Download)
    def setUp(self):
        root = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                'testpkg-import-from-init')
        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)

  1 | 2  Next