MCPcopy Create free account
hub / github.com/CompVis/zigma / run

Method run

dis_causal_conv1d/setup.py:199–223  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

197 """
198
199 def run(self):
200 if FORCE_BUILD:
201 return super().run()
202
203 wheel_url, wheel_filename = get_wheel_url()
204 print("Guessing wheel URL: ", wheel_url)
205 try:
206 urllib.request.urlretrieve(wheel_url, wheel_filename)
207
208 # Make the archive
209 # Lifted from the root wheel processing command
210 # https://github.com/pypa/wheel/blob/cf71108ff9f6ffc36978069acb28824b44ae028e/src/wheel/bdist_wheel.py#LL381C9-L381C85
211 if not os.path.exists(self.dist_dir):
212 os.makedirs(self.dist_dir)
213
214 impl_tag, abi_tag, plat_tag = self.get_tag()
215 archive_basename = f"{self.wheel_dist_name}-{impl_tag}-{abi_tag}-{plat_tag}"
216
217 wheel_path = os.path.join(self.dist_dir, archive_basename + ".whl")
218 print("Raw wheel path", wheel_path)
219 os.rename(wheel_filename, wheel_path)
220 except urllib.error.HTTPError:
221 print("Precompiled wheel not found. Building from source...")
222 # If the wheel could not be downloaded, build from source
223 super().run()
224
225
226setup(

Callers

nothing calls this directly

Calls 1

get_wheel_urlFunction · 0.70

Tested by

no test coverage detected