MCPcopy Create free account
hub / github.com/ipython/ipython / run

Method run

setupext/install_data_ext.py:45–80  ·  view source on GitHub ↗

This is where the meat is. Basically the data_files list must now be a list of tuples of 3 entries. The first entry is one of 'base', 'platbase', etc, which indicates which base to install from. The second entry is the path to install too. The third entry

(self)

Source from the content-addressed store, hash-verified

43
44
45 def run(self):
46 """
47 This is where the meat is. Basically the data_files list must
48 now be a list of tuples of 3 entries. The first
49 entry is one of 'base', 'platbase', etc, which indicates which
50 base to install from. The second entry is the path to install
51 too. The third entry is a list of files to install.
52 """
53 for lof in self.data_files:
54 if lof[0]:
55 base = getattr(self, 'install_' + lof[0])
56 else:
57 base = getattr(self, 'install_base')
58 dir = convert_path(lof[1])
59 if not os.path.isabs(dir):
60 dir = os.path.join(base, dir)
61 elif self.root:
62 dir = change_root(self.root, dir)
63 self.mkpath(dir)
64
65 files = lof[2]
66 if len(files) == 0:
67 # If there are no files listed, the user must be
68 # trying to create an empty directory, so add the
69 # directory to the list of output files.
70 self.outfiles.append(dir)
71 else:
72 # Copy files, adding them to the list of output files.
73 for f in files:
74 f = convert_path(f)
75 (out, _) = self.copy_file(f, dir)
76 #print "DEBUG: ", out # dbg
77 self.outfiles.append(out)
78
79
80 return self.outfiles

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected