Skip to content

Commit 8e7d9ad

Browse files
authored
packaging: update section for language deps and license directive (#411)
* Update packaging package.py files for license and generated deps * Fix black formatting with line-length 99 * Fix highlight line numbers with added directives
1 parent c23ea32 commit 8e7d9ad

17 files changed

Lines changed: 372 additions & 151 deletions

_spack_root

Submodule _spack_root updated 10861 files

outputs/package-py-files/0.package.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
22
# Spack Project Developers. See the top-level COPYRIGHT file for details.
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,25 +20,43 @@
2020
# See the Spack documentation for more information on packaging.
2121
# ----------------------------------------------------------------------------
2222

23-
from spack import *
23+
from spack.package import *
2424

2525

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

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

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

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

39-
# FIXME: Add dependencies if required.
42+
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
43+
44+
depends_on("c", type="build")
45+
depends_on("cxx", type="build")
46+
depends_on("fortran", type="build")
47+
48+
depends_on("autoconf", type="build")
49+
depends_on("automake", type="build")
50+
depends_on("libtool", type="build")
51+
depends_on("m4", type="build")
52+
53+
# FIXME: Add additional dependencies if required.
4054
# depends_on("foo")
4155

56+
def autoreconf(self, spec, prefix):
57+
# FIXME: Modify the autoreconf method as necessary
58+
autoreconf("--install", "--verbose", "--force")
59+
4260
def configure_args(self):
4361
# FIXME: Add arguments other than --prefix
4462
# FIXME: If not needed delete this function

outputs/package-py-files/1.package.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1-
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
22
# Spack Project Developers. See the top-level COPYRIGHT file for details.
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6-
from spack import *
6+
from spack.package import *
77

88

99
class TutorialMpileaks(AutotoolsPackage):
10-
"""Tool to detect and report MPI objects like MPI_Requests and
11-
MPI_Datatypes."""
10+
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
1211

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

16-
maintainers("adamjstewart")
15+
maintainers("alecbcs")
1716

18-
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
17+
license("BSD", checked_by="alecbcs")
1918

20-
# FIXME: Add dependencies if required.
19+
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
20+
21+
depends_on("c", type="build")
22+
depends_on("cxx", type="build")
23+
depends_on("fortran", type="build")
24+
25+
depends_on("autoconf", type="build")
26+
depends_on("automake", type="build")
27+
depends_on("libtool", type="build")
28+
depends_on("m4", type="build")
29+
30+
# FIXME: Add additional dependencies if required.
2131
# depends_on("foo")
2232

33+
def autoreconf(self, spec, prefix):
34+
# FIXME: Modify the autoreconf method as necessary
35+
autoreconf("--install", "--verbose", "--force")
36+
2337
def configure_args(self):
2438
# FIXME: Add arguments other than --prefix
2539
# FIXME: If not needed delete this function

outputs/package-py-files/2.package.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
1-
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
22
# Spack Project Developers. See the top-level COPYRIGHT file for details.
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6-
from spack import *
6+
from spack.package import *
77

88

99
class TutorialMpileaks(AutotoolsPackage):
10-
"""Tool to detect and report MPI objects like MPI_Requests and
11-
MPI_Datatypes."""
10+
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
1211

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

16-
maintainers("adamjstewart")
15+
maintainers("alecbcs")
1716

18-
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
17+
license("BSD", checked_by="alecbcs")
18+
19+
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
20+
21+
depends_on("c", type="build")
22+
depends_on("cxx", type="build")
23+
depends_on("fortran", type="build")
24+
25+
depends_on("autoconf", type="build")
26+
depends_on("automake", type="build")
27+
depends_on("libtool", type="build")
28+
depends_on("m4", type="build")
1929

2030
depends_on("mpi")
2131
depends_on("adept-utils")
2232
depends_on("callpath")
2333

34+
def autoreconf(self, spec, prefix):
35+
# FIXME: Modify the autoreconf method as necessary
36+
autoreconf("--install", "--verbose", "--force")
37+
2438
def configure_args(self):
2539
# FIXME: Add arguments other than --prefix
2640
# FIXME: If not needed delete this function
Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,43 @@
1-
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
22
# Spack Project Developers. See the top-level COPYRIGHT file for details.
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6-
from spack import *
6+
from spack.package import *
77

88

99
class TutorialMpileaks(AutotoolsPackage):
10-
"""Tool to detect and report MPI objects like MPI_Requests and
11-
MPI_Datatypes."""
10+
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
1211

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

16-
maintainers("adamjstewart")
15+
maintainers("alecbcs")
1716

18-
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
17+
license("BSD", checked_by="alecbcs")
18+
19+
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
20+
21+
depends_on("c", type="build")
22+
depends_on("cxx", type="build")
23+
depends_on("fortran", type="build")
24+
25+
depends_on("autoconf", type="build")
26+
depends_on("automake", type="build")
27+
depends_on("libtool", type="build")
28+
depends_on("m4", type="build")
1929

2030
depends_on("mpi")
2131
depends_on("adept-utils")
2232
depends_on("callpath")
2333

34+
def autoreconf(self, spec, prefix):
35+
autoreconf("--install", "--verbose", "--force")
36+
2437
def configure_args(self):
2538
args = [
26-
"--with-adept-utils={0}".format(self.spec["adept-utils"].prefix),
27-
"--with-callpath={0}".format(self.spec["callpath"].prefix),
39+
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
40+
f"--with-callpath={self.spec['callpath'].prefix}",
2841
]
2942

3043
return args
Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,59 @@
1-
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
22
# Spack Project Developers. See the top-level COPYRIGHT file for details.
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6-
from spack import *
6+
from spack.package import *
77

88

99
class TutorialMpileaks(AutotoolsPackage):
10-
"""Tool to detect and report MPI objects like MPI_Requests and
11-
MPI_Datatypes."""
10+
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
1211

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

16-
maintainers("adamjstewart")
15+
maintainers("alecbcs")
1716

18-
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
17+
license("BSD", checked_by="alecbcs")
1918

20-
variant("stackstart", values=int, default=0,
21-
description="Specify the number of stack frames to truncate")
19+
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
20+
21+
variant(
22+
"stackstart",
23+
values=int,
24+
default=0,
25+
description="Specify the number of stack frames to truncate",
26+
)
27+
28+
depends_on("c", type="build")
29+
depends_on("cxx", type="build")
30+
depends_on("fortran", type="build")
31+
32+
depends_on("autoconf", type="build")
33+
depends_on("automake", type="build")
34+
depends_on("libtool", type="build")
35+
depends_on("m4", type="build")
2236

2337
depends_on("mpi")
2438
depends_on("adept-utils")
2539
depends_on("callpath")
2640

41+
def autoreconf(self, spec, prefix):
42+
autoreconf("--install", "--verbose", "--force")
43+
2744
def configure_args(self):
2845
args = [
29-
"--with-adept-utils={0}".format(self.spec["adept-utils"].prefix),
30-
"--with-callpath={0}".format(self.spec["callpath"].prefix),
46+
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
47+
f"--with-callpath={self.spec['callpath'].prefix}",
3148
]
3249

3350
stackstart = int(self.spec.variants["stackstart"].value)
3451
if stackstart:
35-
args.extend([
36-
"--with-stack-start-c={0}".format(stackstart),
37-
"--with-stack-start-fortran={0}".format(stackstart),
38-
])
52+
args.extend(
53+
[
54+
f"--with-stack-start-c={stackstart}",
55+
f"--with-stack-start-fortran={stackstart}",
56+
]
57+
)
3958

4059
return args
Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,61 @@
1-
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
22
# Spack Project Developers. See the top-level COPYRIGHT file for details.
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6-
from spack import *
6+
from spack.package import *
77

88

99
class TutorialMpileaks(AutotoolsPackage):
10-
"""Tool to detect and report MPI objects like MPI_Requests and
11-
MPI_Datatypes."""
10+
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
1211

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

16-
maintainers("adamjstewart")
15+
maintainers("alecbcs")
1716

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

20-
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
19+
license("BSD", checked_by="alecbcs")
2120

22-
variant("stackstart", values=int, default=0,
23-
description="Specify the number of stack frames to truncate")
21+
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
22+
23+
variant(
24+
"stackstart",
25+
values=int,
26+
default=0,
27+
description="Specify the number of stack frames to truncate",
28+
)
29+
30+
depends_on("c", type="build")
31+
depends_on("cxx", type="build")
32+
depends_on("fortran", type="build")
33+
34+
depends_on("autoconf", type="build")
35+
depends_on("automake", type="build")
36+
depends_on("libtool", type="build")
37+
depends_on("m4", type="build")
2438

2539
depends_on("mpi")
2640
depends_on("adept-utils")
2741
depends_on("callpath")
2842

43+
def autoreconf(self, spec, prefix):
44+
autoreconf("--install", "--verbose", "--force")
45+
2946
def configure_args(self):
3047
args = [
31-
"--with-adept-utils={0}".format(self.spec["adept-utils"].prefix),
32-
"--with-callpath={0}".format(self.spec["callpath"].prefix),
48+
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
49+
f"--with-callpath={self.spec['callpath'].prefix}",
3350
]
3451

3552
stackstart = int(self.spec.variants["stackstart"].value)
3653
if stackstart:
37-
args.extend([
38-
"--with-stack-start-c={0}".format(stackstart),
39-
"--with-stack-start-fortran={0}".format(stackstart),
40-
])
54+
args.extend(
55+
[
56+
f"--with-stack-start-c={stackstart}",
57+
f"--with-stack-start-fortran={stackstart}",
58+
]
59+
)
4160

4261
return args

0 commit comments

Comments
 (0)