Skip to content

mark: Create new package.#7069

Merged
adamjstewart merged 6 commits intospack:developfrom
ResearchIT:feature/mark
Dec 17, 2018
Merged

mark: Create new package.#7069
adamjstewart merged 6 commits intospack:developfrom
ResearchIT:feature/mark

Conversation

@lingnanyuan
Copy link
Copy Markdown
Contributor

Add new package: mark.

Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamjstewart @tgamblin Do we have best-practices for something like this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Member

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 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'))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart Jan 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alalazo See #2009 for my take on OS-specific downloads. In my opinion, we need to add a when parameter to the version directive to support this kind of thing if we want to do it right. jdk is another example of a Linux-only package until we implement this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if they do have publicly available downloads, we should definitely use them instead of making users download them manually.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 ?

Related issues I've seen are:
#69
#6967

@adamjstewart adamjstewart merged commit 90b34c9 into spack:develop Dec 17, 2018
tgamblin added a commit that referenced this pull request Dec 17, 2018
tgamblin added a commit that referenced this pull request Dec 17, 2018
tgamblin added a commit that referenced this pull request Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants