-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SCR CMake package #3916
SCR CMake package #3916
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly LGTM -- some requests/comments.
|
||
version('master', git='https://github.com/llnl/scr.git', branch='master') | ||
|
||
depends_on('pdsh') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a build/link dependency? I'm suspicious it's a run dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be build/run. CMake will fail if it's not there, and it's a run dependency.
depends_on('zlib') | ||
depends_on('mpi') | ||
|
||
variant('dtcmp', default=True, description="DTCMP") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there maybe a better description than saying it louder? 😄
# variant('yogrt', default=True, description="Lib YOGRT") | ||
# depends_on('yogrt', when="+yogrt") | ||
|
||
## MySQL not yet in spack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mariadb
is, though. Is it worth making mysql
a vdep and making mariadb
and (some future) mysql
providers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like there's a good guarantee of the two APIs staying identical, so I'm not sure a vdep fits well.
## NOTE: scr-v1.1.8 is built with autotools and is not properly build here. | ||
## scr-v1.1.8 will be deprecated with the upcoming release of v1.2.0 | ||
# url = "https://github.com/LLNL/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz" | ||
# version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth preserving old versions (i.e. are there going to be codes that depend on them?) If so, it might be useful to look at dyninst
, which is an example of a package with two build systems. Only disadvantage is that it extends Package
, which lacks many of the nice phases that AutotoolsPackage
and CMakePackage
provideI. I don't think anyone's tried to do this with multiple inheritance, though it was discussed with @alalazo here in #3642.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should not be any codes dependent on older versions, and as of now the SCR team does not plan to support versions before 1.2.0 once that version is released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tgamblin How frequent are cases where a package changes build system and we want to support both? I ask because multiple inheritance won't work out of the box, but we can think of adding a build system class that is a "variant" (in the design pattern sense) and can defer to a later stage the instantiation of its actual type.
For example we can have this "shell" build system and instruct it to turn either in AutotoolsPackage
or CMakePackage
after the inspection of the version of the concrete spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I only care about installing the latest version of a package. Keeping a single build system for this package makes everyone's life easier. It's an interesting technical problem if @alalazo gets bored, but there are so many other open issues that I think we should drop the old versions altogether and only support CMake releases until we know of someone who actually needs the old releases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alalazo @adamjstewart: Yeah in this case the old releases are not necessary, that I know of. SCR has mainly been used internally at LLNL and people are likely to only need the latest release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is more of an issue for things we've been supporting in Spack for old versions.
@gonsie: gave you write privs -- you can add labels now 😄 |
|
||
class Scr(Package): | ||
from llnl.util.filesystem import join_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import isn't necessary. join_path
is already imported by from spack import *
. To see exactly what comes with that, check out spack.__all__
.
## NOTE: scr-v1.1.8 is built with autotools and is not properly build here. | ||
## scr-v1.1.8 will be deprecated with the upcoming release of v1.2.0 | ||
# url = "https://github.com/LLNL/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz" | ||
# version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I only care about installing the latest version of a package. Keeping a single build system for this package makes everyone's life easier. It's an interesting technical problem if @alalazo gets bored, but there are so many other open issues that I think we should drop the old versions altogether and only support CMake releases until we know of someone who actually needs the old releases.
|
||
def configure_args(self): | ||
args = [] | ||
return args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this needs to go away if it stays empty, leaving it here for now as I'm not sure whether I'll need to change it yet.
|
||
|
||
class Libyogrt(AutotoolsPackage): | ||
"""FIXME: Put a proper description of your package here.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs description.
Here are the things causing flake8 tests to fail:
|
All issues addressed, Todd not available to confirm.
SCR is now using CMake to build.
This package is still being developed, please add the WIP label.