Currently the functionality of 'spack install --only dependencies ...' is provided only on the command line. It would be handy to have the ability to be able to request dependencies only for a package in the specs list of a spack.yaml file.
Currently my workaround is to manually obtain a list of dependencies and write that into the specs list, or perform the 'spack install --only' operation on the command line after building the other specs in the environment.