spack/share/spack/templates/mock-repository/package.pyt
Massimiliano Culpo 112e47cc23 Don't inject import statements in package recipes
Remove a hack done by RepoLoader, which was injecting an extra
```
from spack.package import *
```
at the beginning of each package.py
2024-12-05 12:48:00 -08:00

21 lines
648 B
Python

from spack.package import *
class {{ cls_name }}(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/root-1.0.tar.gz"
version("3.0", sha256='abcde')
version("2.0", sha256='abcde')
version("1.0", sha256='abcde')
{% for dep_spec, dep_type, condition in dependencies %}
{% if dep_type and condition %}
depends_on("{{ dep_spec }}", type="{{ dep_type }}", when="{{ condition }}")
{% elif dep_type %}
depends_on("{{ dep_spec }}", type="{{ dep_type }}")
{% elif condition %}
depends_on("{{ dep_spec }}", when="{{ condition }}")
{% else %}
depends_on("{{ dep_spec }}")
{% endif %}
{% endfor %}