From 4373a2b629780a9c14d97110ed014a5620d4eca6 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Tue, 12 Jul 2016 20:27:44 -0400 Subject: First cut package for nextflow, has issues This is my first cut at a package to support nextflow. It's also my first package. It works, but has issues. I'm going to submit a pull request and get some coaching on how to deal with it. One issue particular: if I install, then uninstall, then try to install again (which uses the cached copy of the "distribution file"), it explodes. --- .../repos/builtin/packages/nextflow/package.py | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/nextflow/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py new file mode 100644 index 0000000000..92e11bbc9f --- /dev/null +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -0,0 +1,24 @@ +from spack import * +from glob import glob +import os + +class Nextflow(Package): + """Data-driven computational pipelines""" + + homepage = "http://www.nextflow.io" + + version('0.20.1', '0e4e0e3eca1c2c97f9b4bffd944b923a', + url='https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow', + expand=False) + + depends_on('jdk') + + def unpack(self): + pass + + def install(self, spec, prefix): + chmod = which('chmod') + + mkdirp(prefix.bin) + install("nextflow", join_path(prefix.bin, "nextflow")) + chmod('+x', join_path(prefix.bin, "nextflow")) -- cgit v1.2.3-60-g2f50 From bfcec696308ee8bfd226a54c17a7e15d49e2aed7 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 25 Jul 2016 14:17:44 -0400 Subject: Add standard header, use spack helpers Added the standard header (stolen from R). Touched up the install to use set_executable rather than doing it myself. --- .../repos/builtin/packages/nextflow/package.py | 31 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py index 92e11bbc9f..a91badd5ed 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -1,6 +1,29 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## from spack import * -from glob import glob -import os + class Nextflow(Package): """Data-driven computational pipelines""" @@ -17,8 +40,6 @@ class Nextflow(Package): pass def install(self, spec, prefix): - chmod = which('chmod') - mkdirp(prefix.bin) install("nextflow", join_path(prefix.bin, "nextflow")) - chmod('+x', join_path(prefix.bin, "nextflow")) + set_executable( join_path(prefix.bin, "nextflow")) -- cgit v1.2.3-60-g2f50 From 6f332c7e4cc10cdbd3c1fa8571bcc276a512b066 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 25 Jul 2016 14:20:06 -0400 Subject: Fix whitespace, make flake8 happ{y,ier}. --- var/spack/repos/builtin/packages/nextflow/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py index a91badd5ed..865534c2f8 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -42,4 +42,4 @@ class Nextflow(Package): def install(self, spec, prefix): mkdirp(prefix.bin) install("nextflow", join_path(prefix.bin, "nextflow")) - set_executable( join_path(prefix.bin, "nextflow")) + set_executable(join_path(prefix.bin, "nextflow")) -- cgit v1.2.3-60-g2f50 From c77425bb2258ccb9df73044230ebca192e4b209e Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Tue, 2 Aug 2016 11:32:19 -0400 Subject: Remove useless `def unpack` Before I learned that I was stumbling over a real but (#1308), I thought I needed to arrange for the fetcher to skip the unpack step. This commit removes the useful `def unpack`. --- var/spack/repos/builtin/packages/nextflow/package.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py index 865534c2f8..54f3dbf915 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -36,9 +36,6 @@ class Nextflow(Package): depends_on('jdk') - def unpack(self): - pass - def install(self, spec, prefix): mkdirp(prefix.bin) install("nextflow", join_path(prefix.bin, "nextflow")) -- cgit v1.2.3-60-g2f50