from spack.spec import Spec numpy_spec = Spec('numpy') numpy_spec.concretize() numpy_spec.package.module
from spack.spec import Spec boost_spec = Spec('boost') boost_spec.versions.default = '1.73.0' boost_spec.variants['shared'] = True boost_spec.concretize() boost_spec.package.libIn this example, we define a package specification for Boost using the Spec() constructor. We set the default version to 1.73.0, enable the shared library variant, and call the concretize() method to generate a concrete build specification. Finally, we extract the library name using the package.lib attribute. In both of these examples, the package library is determined by examining the package.module or package.lib attributes of the concrete package specification generated by the spack.spec module.