Skip to content

Commit

Permalink
Update packaging package.py files for license and generated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alecbcs committed Nov 18, 2024
1 parent 62a8769 commit f71eaf9
Show file tree
Hide file tree
Showing 16 changed files with 327 additions and 132 deletions.
30 changes: 25 additions & 5 deletions outputs/package-py-files/0.package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
Expand All @@ -20,25 +20,45 @@
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack import *
from spack.package import *


class TutorialMpileaks(AutotoolsPackage):
"""FIXME: Put a proper description of your package here."""

# FIXME: Add a proper url for your package's homepage here.
homepage = "https://www.example.com"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"

# FIXME: Add a list of GitHub accounts to
# notify when the package is updated.
# maintainers("github_user1", "github_user2")

version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
# FIXME: Add the SPDX identifier of the project's license below.
# See https://spdx.org/licenses/ for a list. Upon manually verifying
# the license, set checked_by to your Github username.
license("UNKNOWN", checked_by="github_user1")

# FIXME: Add dependencies if required.
version(
"1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9"
)

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

# FIXME: Add additional dependencies if required.
# depends_on("foo")

def autoreconf(self, spec, prefix):
# FIXME: Modify the autoreconf method as necessary
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
Expand Down
32 changes: 24 additions & 8 deletions outputs/package-py-files/1.package.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *


class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and
MPI_Datatypes."""
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""

homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"

maintainers("adamjstewart")
maintainers("alecbcs")

version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
license("BSD", checked_by="alecbcs")

# FIXME: Add dependencies if required.
version(
"1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9"
)

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

# FIXME: Add additional dependencies if required.
# depends_on("foo")

def autoreconf(self, spec, prefix):
# FIXME: Modify the autoreconf method as necessary
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
Expand Down
30 changes: 23 additions & 7 deletions outputs/package-py-files/2.package.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *


class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and
MPI_Datatypes."""
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""

homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"

maintainers("adamjstewart")
maintainers("alecbcs")

version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
license("BSD", checked_by="alecbcs")

version(
"1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9"
)

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")

def autoreconf(self, spec, prefix):
# FIXME: Modify the autoreconf method as necessary
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
Expand Down
33 changes: 24 additions & 9 deletions outputs/package-py-files/3.package.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *


class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and
MPI_Datatypes."""
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""

homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"

maintainers("adamjstewart")
maintainers("alecbcs")

version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
license("BSD", checked_by="alecbcs")

version(
"1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9"
)

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")

def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
args = [
"--with-adept-utils={0}".format(self.spec["adept-utils"].prefix),
"--with-callpath={0}".format(self.spec["callpath"].prefix),
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]

return args
38 changes: 25 additions & 13 deletions outputs/package-py-files/4.package.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *


class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and
MPI_Datatypes."""
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""

homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"

maintainers("adamjstewart")
maintainers("alecbcs")

version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
license("BSD", checked_by="alecbcs")

variant("stackstart", values=int, default=0,
description="Specify the number of stack frames to truncate")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")

variant("stackstart", values=int, default=0, description="Specify the number of stack frames to truncate")

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")

def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
args = [
"--with-adept-utils={0}".format(self.spec["adept-utils"].prefix),
"--with-callpath={0}".format(self.spec["callpath"].prefix),
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]

stackstart = int(self.spec.variants["stackstart"].value)
if stackstart:
args.extend([
"--with-stack-start-c={0}".format(stackstart),
"--with-stack-start-fortran={0}".format(stackstart),
f"--with-stack-start-c={stackstart}",
f"--with-stack-start-fortran={stackstart}",
])

return args
38 changes: 25 additions & 13 deletions outputs/package-py-files/5.package.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *


class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and
MPI_Datatypes."""
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""

homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"

maintainers("adamjstewart")
maintainers("alecbcs")

sanity_check_is_dir = ["bin", "lib", "shar"]

version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
license("BSD", checked_by="alecbcs")

variant("stackstart", values=int, default=0,
description="Specify the number of stack frames to truncate")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")

variant("stackstart", values=int, default=0, description="Specify the number of stack frames to truncate")

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")

def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
args = [
"--with-adept-utils={0}".format(self.spec["adept-utils"].prefix),
"--with-callpath={0}".format(self.spec["callpath"].prefix),
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]

stackstart = int(self.spec.variants["stackstart"].value)
if stackstart:
args.extend([
"--with-stack-start-c={0}".format(stackstart),
"--with-stack-start-fortran={0}".format(stackstart),
f"--with-stack-start-c={stackstart}",
f"--with-stack-start-fortran={stackstart}",
])

return args
Loading

0 comments on commit f71eaf9

Please sign in to comment.