We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5568599 commit 00eddc9Copy full SHA for 00eddc9
setup.py
@@ -26,19 +26,19 @@ def load_requirements(fname):
26
27
class MyInstallData(build_py):
28
def run(self):
29
- from llvm import amdgcn
30
- shutil.copy(
31
- amdgcn.__file__,
32
- Path(self.build_lib)
33
- / HOST_MLIR_PYTHON_PACKAGE_PREFIX
34
- / "extras"
35
- / "dialects"
36
- / "ext"
37
- / "llvm"
38
- / "amdgcn.py",
39
- )
40
-
41
build_py.run(self)
+ try:
+ from llvm import amdgcn
+
+ build_dir = os.path.join(
+ *([self.build_lib] + HOST_MLIR_PYTHON_PACKAGE_PREFIX.split("."))
+ )
+ shutil.copy(
+ amdgcn.__file__,
+ Path(build_dir) / "extras" / "dialects" / "ext" / "llvm" / "amdgcn.py",
+ except ImportError:
+ pass
42
43
44
setup(
0 commit comments