py-torch-nvidia-apex: @3.11: Add config_settings(PEP517), add missing py-packaging (#43306)
This commit is contained in:
parent
99744a766b
commit
99bb288db7
1 changed files with 10 additions and 0 deletions
|
@ -21,6 +21,7 @@ class PyTorchNvidiaApex(PythonPackage, CudaPackage):
|
||||||
|
|
||||||
depends_on("python@3:", type=("build", "run"))
|
depends_on("python@3:", type=("build", "run"))
|
||||||
depends_on("py-setuptools", type="build")
|
depends_on("py-setuptools", type="build")
|
||||||
|
depends_on("py-packaging", type="build")
|
||||||
depends_on("py-torch@0.4:", type=("build", "run"))
|
depends_on("py-torch@0.4:", type=("build", "run"))
|
||||||
depends_on("cuda@9:", when="+cuda")
|
depends_on("cuda@9:", when="+cuda")
|
||||||
depends_on("py-pybind11", type=("build", "link", "run"))
|
depends_on("py-pybind11", type=("build", "link", "run"))
|
||||||
|
@ -43,6 +44,7 @@ def setup_build_environment(self, env):
|
||||||
else:
|
else:
|
||||||
env.unset("CUDA_HOME")
|
env.unset("CUDA_HOME")
|
||||||
|
|
||||||
|
@when("^python@:3.10")
|
||||||
def global_options(self, spec, prefix):
|
def global_options(self, spec, prefix):
|
||||||
args = []
|
args = []
|
||||||
if spec.satisfies("^py-torch@1.0:"):
|
if spec.satisfies("^py-torch@1.0:"):
|
||||||
|
@ -50,3 +52,11 @@ def global_options(self, spec, prefix):
|
||||||
if "+cuda" in spec:
|
if "+cuda" in spec:
|
||||||
args.append("--cuda_ext")
|
args.append("--cuda_ext")
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
@when("^python@3.11:")
|
||||||
|
def config_settings(self, spec, prefix):
|
||||||
|
return {
|
||||||
|
"builddir": "build",
|
||||||
|
"compile-args": f"-j{make_jobs}",
|
||||||
|
"--global-option": "--cpp_ext --cuda_ext",
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue