Move python glue logic again#50616
Conversation
…ly change in the logic)
This reverts commit b96190f.
… before; try allowing detection during concretize_separately
|
I see in e46a9f2 that the spec this was trying to attach python to was As noted in #50616 (comment), envs that use It's probably also worth excluding some/most (non- |
|
LLVM actually references if "python" in spec: # lit's Python needs to be set with this variable
cmake_args.append(define("python_executable", spec["python"].command.path))Note that it's guarded, so I guess things won't fail if you exclude LLVM, but I think it's worth figuring out why LLVM was special here and why running this check on it failed. |
Probably not, as we don't want the import coupling between core and any([c.__name__ == "PythonPackage" for c in cls.__mro__])It would at least exclude the things that would've been excluded before, and would allow us to fix this better later (which is the intent). |
…w/o importing PythonPackage
Yes, but inside of a function used by a phase (so when LLVM is external, none of its references to
In terms of LLVM, that has the same behavior as 2c52cf9 (which is fine, given the above) but I think it is preferable because it achieves exactly the same inclusion/exclusion as before. |
| --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" | ||
| config blame > "${CI_PROJECT_DIR}/jobs_scratch_dir/spack.yaml.blame" | ||
| - spack -v --color=always | ||
| - spack -d -v --color=always |
There was a problem hiding this comment.
IMO it's worth running all spack commands in CI with -d, so I left this here.
There was a problem hiding this comment.
I thought this was something that slipped through, but I see it is not. I'm against this change, for this reason:
The output is not readable, and is truncated because it exceeds limits. I'll submit a PR to revert that, and point to these comments for reference.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
#50616 moved some logic that connects external python extensions to an instance of python; it attempted to do this in a way that matched prior behavior exactly but accidentally applied this for PythonPackage instead of PythonExtension (a superclass of the former) which meant that some packages that this applied to before (e.g. py-pip) were now omitted. Updates the test
Redo of spack#50605 (Move external python glue logic into core) This concerns logic that attaches a `python` dependency to some external packages (because they expect an instance of `python` in their DAG). spack#50605 was intended to be a simple relocation of logic from the package repo to the core. That PR caused a failure because it was attempting to attach python to a bigger set of dependents: originally this logic only ran for packages that were a subclass of `PythonPackage`, and that PR made it run for all packages that `extends(python)`; notably that included LLVM, and in particular this occurred inside of an environment that set `unify: false`; attaching Python can involve looking for an instance of Python on the system, and normal external detection runs with a process pool, which is prohibited in the context of `concretize_separately` (which itself uses a process pool with daemon processes). This PR reapplies the logic from spack#50605 with two additional changes: * Match the previous inclusion/exclusion semantics by only attaching Python to external packages that are a subclass of `PythonPackage` * Update external Python search to run within the current process (so that it can run as part of `concretize_separately`)
Redo of #50605
Now with fixes
Right now it should fail, because this doesn't add anything to the changes. Once I can reproduce the failure, I think I know how to fix it