mark: Create new package.#7069
Conversation
alalazo
left a comment
There was a problem hiding this comment.
Not sure how to deal with this kind of packages. Waiting for some pointers.
|
|
||
| You will need to download the package yourself, unzip, rename it | ||
| following the guide in 'http://www.phidot.org/software/mark/rmark/linux/' | ||
| Step(1), Spack will search your current directory for the download file. |
There was a problem hiding this comment.
@adamjstewart @tgamblin Do we have best-practices for something like this?
There was a problem hiding this comment.
My best practice is to require them to download it, and either throw it in a mirror renamed, or find it in the current directory not-renamed. See pgi, matlab, or vizglow for how I've handled it in the past. Feel free to steal the docstring from those if you want to keep it consistent.
|
|
||
| You will need to download the package yourself, unzip, rename it | ||
| following the guide in http://www.phidot.org/software/mark/rmark/linux/ | ||
| Step(1).Spack will search your current directory for the download file. |
There was a problem hiding this comment.
missing a space after the period.
| following the guide in http://www.phidot.org/software/mark/rmark/linux/ | ||
| Step(1).Spack will search your current directory for the download file. | ||
| Alternatively, add this file to a mirror so that Spack can find it. | ||
| For instructions on how to set up amirror, see |
There was a problem hiding this comment.
missing a space between "a" and "mirror"
| chmod('+x', join_path(prefix.bin, 'mark')) | ||
|
|
||
| def setup_environment(self, spack_env, run_env): | ||
| run_env.prepend_path('PATH', self.prefix) |
There was a problem hiding this comment.
It doesn't look like you're putting anything in self.prefix. Is this method necessary?
| install('mark', prefix.bin) | ||
|
|
||
| chmod = which('chmod') | ||
| chmod('+x', join_path(prefix.bin, 'mark')) |
There was a problem hiding this comment.
You can actually replace join_path(prefix.bin, 'mark') with prefix.bin.mark.
|
|
||
| homepage = "http://www.phidot.org/software/mark/index.html" | ||
|
|
||
| version('1.0', '64f2fb0837c38d6e41c7546b25627146', expand=False) |
There was a problem hiding this comment.
@adamjstewart @lingnanyuan I was reading the docs above, and wondering if we could do something like (pseudo-code):
if distro.id() == 'darwin':
version('1.0', ..., url=http://www.phidot.org/software/mark/downloads/files/mark.osx.zip)
else:
version('1.0', ..., url=http://www.phidot.org/software/mark/downloads/files/mark.64.zip)That won't allow installing cross-installing (which is a rare occurrence imo), but at least it won't require people to download things manually.
There was a problem hiding this comment.
But if they do have publicly available downloads, we should definitely use them instead of making users download them manually.
There was a problem hiding this comment.
Because when I tried spack create this url, spack reported error:
curl: (22) The requested URL returned error: 403 Forbidden
So I downloaded it manually.
There was a problem hiding this comment.
@adamjstewart or @alalazo - any decision on how you want this done ? Lingnan has moved on, but we can make whatever changes are needed to get this merged.
Spack can't fetch the packge due to user-agent identification from curl. AFAIK - there's not a recommended way to do this from spack yet, right ?
Add new package: mark.