-
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
All CMakePackages depend on CMake #2466
Comments
We might need to adjust the way directives store metadata for this, but I think it's a good idea. |
@adamjstewart I didn't do that because of what @tgamblin said, see here. I think I may have an idea anyhow how to do that: instead of using
Does that make sense to you @tgamblin ? |
I thought of this too. But I'm doubtful for two reasons:
|
What I propose above involves substituting the use of |
I have mixed feelings:
1. I like the idea of being able to inherit `depends_on()` declarations ---
even if I'm not thrilled about its application in this particular case.
2. I don't like things that require meta-classes to implement: we will lose
99% of Python programmers at that point. But given that this is buried
deep within Spack and not user-visible, I'd give it a pass --- as long as
we can't think of any way to get the desired functionality without
meta-classes.
…On Tue, Dec 6, 2016 at 7:12 AM, Massimiliano Culpo ***@***.*** > wrote:
We continue to go down the path of making things more implicitly automagic
in order to save a few lines in the package.py files. I continue to think
that is a dangerous idea --- at least something we should have a serious
discussion about. So far, we have not had that discussion.
What I propose above involves substituting the use of inspect.stack with
meta-classes. It's not additional machinery, just a refactoring of the
existing one that permits to inherit across different module files
(currently you can't).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2466 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd31-LjxVQL-3zZs4EyfLkgXc_S3Oks5rFVEvgaJpZM4LDFSE>
.
|
@citibeth This won't be a problem. You can always add |
…ming from directives into packages + lazy directives * _dep_types -> dependency_types * using a meta-class to inject directives into packages * directives are lazy fixes spack#2466
…ming from directives into packages + lazy directives * _dep_types -> dependency_types * using a meta-class to inject directives into packages * directives are lazy fixes spack#2466
* inheritance of directives: using meta-classes to inject attributes coming from directives into packages + lazy directives * _dep_types -> dependency_types * using a meta-class to inject directives into packages * directives are lazy fixes #2466 * directives.py: allows for multiple inheritance. Added blank lines as suggested by @tgamblin * directives.py: added a test for simple inheritance of directives * Minor improvement requested by @tgamblin CMakePackage: importing names from spack.directives directives: wrap __new__ to respect pep8 * Refactoring requested by @tgamblin directives: removed global variables in favor of class variables. Simplified the interface for directives (they return a callable on a package or a list of them).
@alalazo Is there any reason we can't add
depends_on('cmake', type='build')
to the CMakePackage base class? It seems silly to have to add it to every package that extends it.The text was updated successfully, but these errors were encountered: