Use the maintainers
directive in all base classes (#35324)
* Use the `maintainers` directive in all base classes * Update unit tests
This commit is contained in:
parent
1894b64851
commit
dd434ec413
5 changed files with 22 additions and 13 deletions
|
@ -21,7 +21,7 @@
|
|||
import spack.package_base
|
||||
import spack.spec
|
||||
import spack.store
|
||||
from spack.directives import build_system, depends_on, extends
|
||||
from spack.directives import build_system, depends_on, extends, maintainers
|
||||
from spack.error import NoHeadersError, NoLibrariesError, SpecError
|
||||
from spack.version import Version
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
|
||||
class PythonExtension(spack.package_base.PackageBase):
|
||||
maintainers = ["adamjstewart"]
|
||||
maintainers("adamjstewart", "pradyunsg")
|
||||
|
||||
@property
|
||||
def import_modules(self):
|
||||
|
@ -184,8 +184,6 @@ class PythonPackage(PythonExtension):
|
|||
#: Package name, version, and extension on PyPI
|
||||
pypi: Optional[str] = None
|
||||
|
||||
maintainers = ["adamjstewart", "pradyunsg"]
|
||||
|
||||
# To be used in UI queries that require to know which
|
||||
# build-system class we are using
|
||||
build_system_class = "PythonPackage"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import llnl.util.lang as lang
|
||||
|
||||
from spack.directives import extends
|
||||
from spack.directives import extends, maintainers
|
||||
|
||||
from .generic import GenericBuilder, Package
|
||||
|
||||
|
@ -71,7 +71,7 @@ class RPackage(Package):
|
|||
|
||||
GenericBuilder = RBuilder
|
||||
|
||||
maintainers = ["glennpj"]
|
||||
maintainers("glennpj")
|
||||
|
||||
#: This attribute is used in UI queries that need to know the build
|
||||
#: system base class
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
import spack.builder
|
||||
from spack.build_environment import SPACK_NO_PARALLEL_MAKE, determine_number_of_jobs
|
||||
from spack.directives import build_system, extends
|
||||
from spack.directives import build_system, extends, maintainers
|
||||
from spack.package_base import PackageBase
|
||||
from spack.util.environment import env_flag
|
||||
from spack.util.executable import Executable, ProcessError
|
||||
|
@ -23,7 +23,7 @@ class RacketPackage(PackageBase):
|
|||
"""
|
||||
|
||||
#: Package name, version, and extension on PyPI
|
||||
maintainers = ["elfprince13"]
|
||||
maintainers("elfprince13")
|
||||
# To be used in UI queries that require to know which
|
||||
# build-system class we are using
|
||||
build_system_class = "RacketPackage"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import spack.builder
|
||||
import spack.package_base
|
||||
from spack.directives import build_system, extends
|
||||
from spack.directives import build_system, extends, maintainers
|
||||
|
||||
from ._checks import BaseBuilder
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
class RubyPackage(spack.package_base.PackageBase):
|
||||
"""Specialized class for building Ruby gems."""
|
||||
|
||||
maintainers = ["Kerilk"]
|
||||
maintainers("Kerilk")
|
||||
|
||||
#: This attribute is used in UI queries that need to know the build
|
||||
#: system base class
|
||||
|
|
|
@ -14,7 +14,13 @@
|
|||
|
||||
maintainers = spack.main.SpackCommand("maintainers")
|
||||
|
||||
MAINTAINED_PACKAGES = ["maintainers-1", "maintainers-2", "maintainers-3", "py-extension1"]
|
||||
MAINTAINED_PACKAGES = [
|
||||
"maintainers-1",
|
||||
"maintainers-2",
|
||||
"maintainers-3",
|
||||
"py-extension1",
|
||||
"py-extension2",
|
||||
]
|
||||
|
||||
|
||||
def split(output):
|
||||
|
@ -53,6 +59,9 @@ def test_all(mock_packages, capfd):
|
|||
"pradyunsg,",
|
||||
"user1,",
|
||||
"user2",
|
||||
"py-extension2:",
|
||||
"adamjstewart,",
|
||||
"pradyunsg",
|
||||
]
|
||||
|
||||
with capfd.disabled():
|
||||
|
@ -69,9 +78,11 @@ def test_all_by_user(mock_packages, capfd):
|
|||
out = split(maintainers("--all", "--by-user"))
|
||||
assert out == [
|
||||
"adamjstewart:",
|
||||
"py-extension1",
|
||||
"py-extension1,",
|
||||
"py-extension2",
|
||||
"pradyunsg:",
|
||||
"py-extension1",
|
||||
"py-extension1,",
|
||||
"py-extension2",
|
||||
"user0:",
|
||||
"maintainers-3",
|
||||
"user1:",
|
||||
|
|
Loading…
Reference in a new issue