Skip to content

WIP: build systems rewrite for isc25 #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions tutorial/examples/Autotools/0.package.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack_repo.builtin.build_systems.autotools import AutotoolsPackage
from spack.package import *


class Mpileaks(AutotoolsPackage):
"""Tool to detect and report leaked 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/hpc/mpileaks"
url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

version('1.0', '8838c574b39202a57d7c2d68692718aa')
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")

depends_on("mpi")
depends_on("adept-utils")
Expand All @@ -25,3 +25,4 @@ def install(self, spec, prefix):
"--with-callpath=" + spec['callpath'].prefix)
make()
make("install")

1 change: 1 addition & 0 deletions tutorial/examples/Autotools/1.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ def configure_args(self):
args.extend([f'--with-stack-start-c={stackstart}',
f'--with-stack-start-fortran={stackstart}'])
return args

36 changes: 26 additions & 10 deletions tutorial/examples/Cmake/0.package.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
Expand All @@ -15,23 +17,37 @@
# spack edit callpath
#
# See the Spack documentation for more information on packaging.
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
from spack import *
# ----------------------------------------------------------------------------

from spack.package import *
from spack_repo.builtin.build_systems.cmake import CMakePackage


class Callpath(CMakePackage):
"""FIXME: Put a proper description of your package here."""

# FIXME: Add a proper url for your package's homepage here.
homepage = "http://www.example.com"
url = "https://github.com/llnl/callpath/archive/v1.0.1.tar.gz"
homepage = "https://www.example.com"
url = "https://github.com/llnl/callpath/archive/v1.0.3.tar.gz"

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

# 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")

version(
"1.0.3",
sha256="a7ddba34de8387a8cb2af9c46bf24e5d307fb196e6dd433707641219c8b4af3e",
)

version('1.0.3', 'c89089b3f1c1ba47b09b8508a574294a')
depends_on("cxx", type="build")

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

def cmake_args(self):
# FIXME: Add arguments other than
Expand Down
16 changes: 10 additions & 6 deletions tutorial/examples/Cmake/1.package.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *
from spack_repo.builtin.build_systems.cmake import CMakePackage


class Callpath(CMakePackage):
"""Library for representing callpaths consistently in
distributed-memory performance tools."""
distributed-memory performance tools."""

homepage = "https://github.com/llnl/callpath"
url = "https://github.com/llnl/callpath/archive/v1.0.3.tar.gz"
url = "https://github.com/llnl/callpath/archive/v1.0.3.tar.gz"

version('1.0.3', 'c89089b3f1c1ba47b09b8508a574294a')
version(
"1.0.3",
sha256="a7ddba34de8387a8cb2af9c46bf24e5d307fb196e6dd433707641219c8b4af3e",
)

depends_on("cxx", type="build")
depends_on("elf", type="link")
depends_on("libdwarf")
depends_on("dyninst")
Expand Down
16 changes: 10 additions & 6 deletions tutorial/examples/Cmake/2.package.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from spack.package import *
from spack_repo.builtin.build_systems.cmake import CMakePackage


class Callpath(CMakePackage):
"""Library for representing callpaths consistently in
distributed-memory performance tools."""
distributed-memory performance tools."""

homepage = "https://github.com/llnl/callpath"
url = "https://github.com/llnl/callpath/archive/v1.0.3.tar.gz"
url = "https://github.com/llnl/callpath/archive/v1.0.3.tar.gz"

version('1.0.3', 'c89089b3f1c1ba47b09b8508a574294a')
version(
"1.0.3",
sha256="a7ddba34de8387a8cb2af9c46bf24e5d307fb196e6dd433707641219c8b4af3e",
)

depends_on("cxx", type="build")
depends_on("elf", type="link")
depends_on("libdwarf")
depends_on("dyninst")
Expand Down
68 changes: 48 additions & 20 deletions tutorial/examples/PyPackage/0.package.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,69 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
# spack install py-pandas
# spack install py-requests
#
# You can edit this file again by typing:
#
# spack edit py-pandas
# spack edit py-requests
#
# See the Spack documentation for more information on packaging.
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
from spack import *
# ----------------------------------------------------------------------------

from spack.package import *
from spack_repo.builtin.build_systems.python import PythonPackage


class PyPandas(PythonPackage):
class PyRequests(PythonPackage):
"""FIXME: Put a proper description of your package here."""

# FIXME: Add a proper url for your package's homepage here.
homepage = "http://www.example.com"
url = "https://pypi.io/packages/source/p/pandas/pandas-0.19.0.tar.gz"
homepage = "https://www.example.com"
pypi = "requests/requests-2.32.3.tar.gz"

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

# 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")

version(
"2.32.3",
sha256="55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760",
)

# FIXME: Only add the python/pip/wheel dependencies if you need specific versions
# or need to change the dependency type. Generic python/pip/wheel dependencies are
# added implicity by the PythonPackage base class.
# depends_on("python@2.X:2.Y,3.Z:", type=("build", "run"))
# depends_on("py-pip@X.Y:", type="build")
# depends_on("py-wheel@X.Y:", type="build")

# FIXME: Add a build backend, usually defined in pyproject.toml. If no such file
# exists, use setuptools.
# depends_on("py-setuptools", type="build")
# depends_on("py-hatchling", type="build")
# depends_on("py-flit-core", type="build")
# depends_on("py-poetry-core", type="build")

version('0.19.0', 'bc9bb7188e510b5d44fbdd249698a2c3')
# FIXME: Add additional dependencies if required.
# depends_on("py-foo", type=("build", "run"))

# FIXME: Add dependencies if required.
# depends_on('py-setuptools', type='build')
# depends_on('py-foo', type=('build', 'run'))
def config_settings(self, spec, prefix):
# FIXME: Add configuration settings to be passed to the build backend
# FIXME: If not needed, delete this function
settings = {}
return settings

def build_args(self, spec, prefix):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
args = []
return args
49 changes: 20 additions & 29 deletions tutorial/examples/PyPackage/1.package.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class PyPandas(PythonPackage):
"""pandas is a Python package providing fast, flexible, and expressive
data structures designed to make working with relational or
labeled data both easy and intuitive. It aims to be the
fundamental high-level building block for doing practical, real
world data analysis in Python. Additionally, it has the broader
goal of becoming the most powerful and flexible open source data
analysis / manipulation tool available in any language.
"""
homepage = "http://pandas.pydata.org/"
url = "https://pypi.io/packages/source/p/pandas/pandas-0.19.0.tar.gz"

version('0.19.0', 'bc9bb7188e510b5d44fbdd249698a2c3')
version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6')
version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8')
version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73')

depends_on('py-dateutil', type=('build', 'run'))
depends_on('py-numpy', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-cython', type='build')
depends_on('py-pytz', type=('build', 'run'))
depends_on('py-numexpr', type=('build', 'run'))
depends_on('py-bottleneck', type=('build', 'run'))
from spack.package import *
from spack_repo.builtin.build_systems.python import PythonPackage


class PyRequests(PythonPackage):
"""Python HTTP for Humans."""

homepage = "https://requests.readthedocs.io"
pypi = "requests/requests-2.32.3.tar.gz"

version("2.32.3", sha256="55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760")

depends_on("py-setuptools", type="build")

depends_on("py-charset-normalizer", type=("build", "run"))
depends_on("py-idna", type=("build", "run"))
depends_on("py-urllib3", type=("build", "run"))
depends_on("py-certifi", type=("build", "run"))

Loading