File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 44
55from pip ._internal .req import parse_requirements
66from setuptools import setup , find_namespace_packages
7- from setuptools .command .install import install
7+ from setuptools .command .build_py import build_py
88
99# TODO: find from extras maybe
1010HOST_MLIR_PYTHON_PACKAGE_PREFIX = os .environ .get (
@@ -24,13 +24,12 @@ def load_requirements(fname):
2424] + [f"{ HOST_MLIR_PYTHON_PACKAGE_PREFIX } .extras" ]
2525
2626
27- class MyInstallData (install ):
27+ class MyInstallData (build_py ):
2828 def run (self ):
2929 from llvm import amdgcn
30- self .mkpath (self .install_dir )
3130 shutil .copy (
3231 amdgcn .__file__ ,
33- Path (self .install_dir )
32+ Path (self .build_lib )
3433 / HOST_MLIR_PYTHON_PACKAGE_PREFIX
3534 / "extras"
3635 / "dialects"
@@ -39,7 +38,7 @@ def run(self):
3938 / "amdgcn.py" ,
4039 )
4140
42- install .run (self )
41+ build_py .run (self )
4342
4443
4544setup (
@@ -60,5 +59,5 @@ def run(self):
6059 package_dir = {
6160 f"{ HOST_MLIR_PYTHON_PACKAGE_PREFIX } .extras" : "mlir/extras" ,
6261 },
63- cmdclass = {"install " : MyInstallData },
62+ cmdclass = {"build_py " : MyInstallData },
6463)
You can’t perform that action at this time.
0 commit comments