Skip to content
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

Explore Spack to specify built #76

Open
oruebel opened this issue Aug 21, 2024 · 0 comments
Open

Explore Spack to specify built #76

oruebel opened this issue Aug 21, 2024 · 0 comments
Labels
category: proposal proposed enhancements or new features priority: low alternative solution already working and/or relevant to only specific user(s)

Comments

@oruebel
Copy link
Contributor

oruebel commented Aug 21, 2024

To simplify building aqnwb for users we could explore Spack to build aqnwb and all dependencies together

A package.py for aqnwb would probably look something like this

from spack.package import *

class Aqnwb(CMakePackage):
    """Description of aqnwb project."""

    homepage = "https://neurodatawithoutborders.github.io/aqnwb/"
    url      = "https://github.com/NeurodataWithoutBorders/aqnwb/archive/refs/tags/v1.0.0.tar.gz"
    git      = "https://github.com/NeurodataWithoutBorders/aqnwb.git"

    version('1.0.0', sha256='your_project_tarball_sha256sum')
    version('develop', branch='main')

    # Specify minimum versions for dependencies
    depends_on('[email protected]:')
    depends_on('boost')

    # Define a variant for build type
    variant('build_type', default='Release', values=('Debug', 'Release',), description='CMake build type')

    def cmake_args(self):
        args = []

        hdf5_prefix = self.spec['hdf5'].prefix
        boost_prefix = self.spec['boost'].prefix

        args.append('-DHDF5_ROOT={0}'.format(hdf5_prefix))
        args.append('-DBOOST_ROOT={0}'.format(boost_prefix))

        # Add the build type to the CMake arguments
        build_type = self.spec.variants['build_type'].value
        args.append('-DCMAKE_BUILD_TYPE={0}'.format(build_type))

        return args
@oruebel oruebel added category: proposal proposed enhancements or new features priority: low alternative solution already working and/or relevant to only specific user(s) labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: proposal proposed enhancements or new features priority: low alternative solution already working and/or relevant to only specific user(s)
Projects
None yet
Development

No branches or pull requests

1 participant