55
55
self.plugin_name = name
57
self.sourcedir = os.path.join(os.getcwd(), "parts", part_name, "src")
58
self.builddir = os.path.join(os.getcwd(), "parts", part_name, "build")
59
self.installdir = os.path.join(os.getcwd(), "parts", part_name, "install")
60
self.stagedir = os.path.join(os.getcwd(), "stage")
61
self.snapdir = os.path.join(os.getcwd(), "snap")
62
self.statefile = os.path.join(os.getcwd(), "parts", part_name, "state")
57
parts_dir = os.path.join(os.getcwd(), 'parts')
58
self.sourcedir = os.path.join(parts_dir, part_name, 'src')
59
self.builddir = os.path.join(parts_dir, part_name, 'build')
60
self.installdir = os.path.join(parts_dir, part_name, 'install')
61
self.stagedir = os.path.join(os.getcwd(), 'stage')
62
self.snapdir = os.path.join(os.getcwd(), 'snap')
63
self.statefile = os.path.join(parts_dir, part_name, 'state')
124
125
return self.part_names[0]
126
127
def makedirs(self):
128
os.makedirs(self.sourcedir)
129
except FileExistsError:
132
os.makedirs(self.builddir)
133
except FileExistsError:
136
os.makedirs(self.installdir)
137
except FileExistsError:
140
os.makedirs(self.stagedir)
141
except FileExistsError:
144
os.makedirs(self.snapdir)
145
except FileExistsError:
129
self.sourcedir, self.builddir, self.installdir, self.stagedir,
133
os.makedirs(d, exist_ok=True)
148
135
def is_valid(self):
149
136
return self.valid