-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
spack edit -f => spack create #1108
Comments
I agree -- want to submit a PR? I think there should probably be |
I can start working on this. I disagree about the alias though. What reason would there be to keep |
If you type
I think in the end, your way is more intuitive. How about at least a warning saying that it's been changed to |
Ah, now I see the logic behind the original design. But I think
Deal. I'll put in a deprecation warning for now. If you really want, I can put in a deprecation warning and a temporary alias, but you'll have to show me how to do that. I'll get started on this as soon as #1112 gets merged. |
Pinging some users for opinions. @alalazo @mwilliammyers @trws @robertdfrench @DavidPoliakoff @mamelara @eschnett @citibeth @gartung @glennpj @mathstuf |
There already is a
What about having the |
I've never actually used Maybe make |
I am a new user and I have already used the |
@mwilliammyers What packages have you had to use |
@adamjstewart I messed up some URLs or something when creating new packages and wanted to overwrite the incorrect existing packages. It was confusing to me that they were part of |
Ah, you were using |
So we have one vote for |
I'm fine with it just taking either, as long as the -n option is a On 27 Jun 2016, at 14:25, Adam J. Stewart wrote:
|
So far I don't use
Reasons for not using
That said, I do think that some Spack commands could be useful in helping build Spack packages:
|
+1 for spack create -f accepting URL or package name Maybe in a separate PR, but perhaps having a -t (template) and having a set of template packages. I certainly wouldn't mind typing
and seeing a package with that name and some boilerplate cmake put together. Dragging this back on topic, +1 for create -f accepting URL or package name |
Also, while this is Spack-Christmas, I want to be able to store a package.py in the root of my git repo and have spack (something) (my-github-url) do a clone, look at package.py, and magically make the right thing happen through magic |
As for the
@citibeth If you haven't used CMake# FIXME: Add additional dependencies if required.
depends_on('cmake')
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
# FIXME: Modify the cmake line to suit your build system here.
cmake('..', *std_cmake_args)
# FIXME: Add logic to build and install here.
make()
make('install') R# FIXME: Add additional dependencies if required.
extends('R')
def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path) Python# FIXME: Add additional dependencies if required.
extends('python')
def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
python('setup.py', 'install', '--prefix={0}'.format(prefix)) If there are any other build systems you would like to add, or default installation instructions you would like to modify, please let me know. |
Quite so, but this is assuming 1) that there is a tarball, and 2) that On 27 Jun 2016, at 19:10, Adam J. Stewart wrote:
|
I guess we could add a |
Yeah, less crassly on my second comment, better git interactions (including just doing some of the awesome stuff it does with tarballs) would be great. Otherwise I'll write an extension that downloads a github repository, tars it up, then creates a spack package from that, and Todd will cry Out for the day, but thanks for your effort and engagement on this! |
Out of the packages currently in Spack, 99% have a downloadable URL (1% are licensed). |
As @DavidPoliakoff mentioned, doing something useful with a repository URL where the protocol can be determined easily would be great. |
If you're using GitHub, you can always get a tarball from it for any Git On Mon, Jun 27, 2016 at 10:14 PM, David Poliakoff notifications@github.com
|
I guess my push on this is that I want a lot more out of Spack+git (ideally with the hub package enabled). I want "When a spack install fails on a package associated with a git repository, if the repo owner allows it and the spack install allows it, raise an issue" and "spack install [github repo containing a valid package.py, as in Bower]" and for that "spack install github repo" to allow for dependencies on other github repo links. I want "spack request [github URL]" to raise an issue saying that a person wants a spack package to be made for a given URL, hopefully not on the main spack issues list, but somewhere. I think there's a lot of fun stuff to be done with git and github and hub. I haven't really put in the time/effort on Spack to get too belligerent about how things should work, but think there's a really fun space to explore in "spack [words] [github URL]," the other day I did a "bower install [github URL]," used the resulting extension in my web page, and went from having the idea that a project was cool to seeing it live on my website in under five minutes, that has me pretty excited for package managers being aware of github Sorry, I can't tell whether the tone of this is aggressive, it's really not meant that way if it's coming off that way, more "whoa look at what's cool in this part of the idea space" |
Pardon my long rant below, I hope it is uesful.
I don't understand the reasoning here. "URL's usually work, therefore this Spack commands have a grammar, one that can now be deduced by looking at Therefore, the correct form for But you say that (in at least some cases), the direct object (package) By setting up a consistent grammar like this, other variants become
Rather than arguing about what percentage of users need these variants, it The added clarity, consistency and flexibility is well worth the extra Is this a trivial matter? Maybe. But add it up over (now) dozens of Spack
Automagic package creation is a minor issue: nobody is stuck if it doesn't Therefore, after my long rant on grammar, I would suggest that we don't get |
David, I replied to you on the general Spack mailing list: https://groups.google.com/forum/?hl=en#!topic/spack/eD5BDi3j7vA -- Elizabeth On Mon, Jun 27, 2016 at 10:59 PM, David Poliakoff notifications@github.com
|
Just my two cents : I think the interface @citibeth is proposing is a good one. Having a I won't comment on issues or prioritization : I think the topic can very well be a (long) thread on its own ... 😄 |
@DavidPoliakoff I'm not entirely sure I understand what functionality you would like, but it sounds like it's outside of the scope of this issue ( @citibeth I see your point. I was arguing in terms of usability and you were arguing in terms of sensibility (grammar and consistency). I'm not opposed to your naming scheme. @tgamblin Thoughts on the following scheme:
It certainly won't be backwards compatible, but I've never cared much for backwards compatibility anyway. We would have to deprecate |
If someone says ' Spack create url', why not gently warn them and go ahead Spack create should never overwrite an existing pkg, unless -f is used. |
I believe we should think about the UI in terms of a consistent "correct" grammar that we've defined, and what people might actually type. The UI shown above ( If users type something else --- most likely |
I was sort of proposing that the |
Can someone explain how this line works? I'm confused as to why this is a class instead of a function. Is that the only way to access stage? Is self.build_system propagated outside of create.py? I was thinking about turning ConfigureGuesser into a function that just returned the build_system. |
@adamjstewart That allows you to call the class's instance like a function. It allows you to use it like, |
@adamjstewart: it's hacky. It's a callable object because it sets some attributes about what it discovered at the end of |
Oh wow, this is hacky. I guess I always assumed |
Another design question for you. Currently, if I run
but then it will create a package called |
I like this feature. Probably best to say "py-restview" throughout, to let On Thu, Jun 30, 2016 at 10:30 AM, Adam J. Stewart notifications@github.com
|
Agreed, it should use the actual package name if at all possible. |
What exactly is a namespace? |
Every repo has a namespace that gets prepended to its packages' names so we can tell where they came from. e.g., the $ spack install libelf On a vanilla Spack install, after concretization, the full name is actually set to So, suppose your repo had the namespace You can also use fully qualified names in Specs. So if you really want to build
Basically it's a mechanism for referring to potentially conflicting packages in different repositories. |
Oh, that's really useful. So let's say I have two clusters (ours are called Blues and Fusion), both with identical platform/os/target and a single shared GPFS |
You could use it for that, although this particular thing actually sounds like something @alalazo and I have talked about w.r.t. how the architecture should be extended. namespaces might be useful as a stopgap. I do not know if @alalazo actually supports any classification by namespace in his module stuff, but I imagine that would be easy to add. |
Are we confusing package with built installations? Shouldn't you be able to build multiple versions of your MPI things on Blues vs. Fusion, providing different MPI dependency resolution? |
@adamjstewart For module generation I think that repo namespaces won't be the way to go to discern among different architectures. What you should use imho is either At EPFL in fact we share your same situation : what we did was to set up an automated way (i.e. we use Jenkins) to build software for 5 different I may be more specific if you would like more information, but maybe we should move this discussion elsewhere (to the google group?) |
@citibeth Yeah, I can. I was just wondering what namespaces are used for and if they can be useful to my situation. Ideally, I could set something in @alalazo But once our new machine lands, we'll have two linux-centos7-x86_64 machines, so I don't think platform/os/target is sufficient for us to distinguish them. Anyway, I was just wondering because it's an option for |
@adamjstewart Ok, but you can either define a custom target or wait for |
@alalazo Probably? Although things that don't depend on MPI should theoretically work across both. Right now, our two machines aren't actually on the same version of CentOS, and I'm finding that things are linking to system libraries. In particular, glibc is a different version on each machine, and that's making almost everything incompatible if it was installed on the other machine. Anyway, this tangent has gone on long enough. I'll ask you for more details once we actually switch to modules. |
Yes, but what's the harm in duplicating a build ? |
I agree, I would just have two separate spacks cnd be done with the issue.
|
Time, space. Mostly it's annoying that I can't use Spack while I'm waiting for the package to finish installing. But I think we have a couple PRs in progress now that should alleviate that 😃 |
Anyway, if this isn't a great use case for using different namespaces, what is? |
@adamjstewart Having site specific packages that you need to install for any reason, but that are not worth to be put / cannot be put in spack builtin. In that case you can set up a repo of those packages somewhere else. In the long run the feature may also be useful to set up, e.g. independent community specific repos (though this needs spack to be a bit more stable than it currently is) |
@citibeth's proposal to change the UI from |
In my mind, the following distinction should be made:
spack create
: create a new packagespack edit
: edit an existing packageHowever,
spack edit
is doing double duty, because ifspack create
fails or your software cannot be downloaded, then you need to runspack edit -f
to create a new package. This is kind of confusing, but more importantly bothlib/spack/spack/cmd/create.py
andlib/spack/spack/cmd/edit.py
have completely different default templates. The template inedit.py
doesn't have license info, doesn't contain FIXME info, isn't PEP8 compliant, and assumes Autotools instead of saying Unknown build system.The text was updated successfully, but these errors were encountered: