Update Package: Git-LFS (#1769)
* Fixed a few small bugs in the 'git-lfs' install script. * Fixed a bug in the '(go|go-bootstrap)@1.4.2+test' install scripts. * Fixing a minor style issue in the 'git-lfs' install script.
This commit is contained in:
committed by
Todd Gamblin
parent
00bac8f294
commit
7f9e89eb53
@@ -26,17 +26,28 @@
|
|||||||
|
|
||||||
|
|
||||||
class GitLfs(Package):
|
class GitLfs(Package):
|
||||||
"""Tool for managing large files with Git."""
|
"""Git LFS is a system for managing and versioning large files in
|
||||||
|
association with a Git repository. Instead of storing the large files
|
||||||
|
within the Git repository as blobs, Git LFS stores special "pointer
|
||||||
|
files" in the repository, while storing the actual file contents on a
|
||||||
|
Git LFS server."""
|
||||||
|
|
||||||
homepage = "https://git-lfs.github.com"
|
homepage = "https://git-lfs.github.com"
|
||||||
url = "https://github.com/github/git-lfs/archive/v1.4.1.tar.gz"
|
git_url = "https://github.com/github/git-lfs.git"
|
||||||
|
|
||||||
version('1.4.1', 'c62a314d96d3a30af4d98fa3305ad317')
|
version('1.4.1', git=git_url, tag='v1.4.1')
|
||||||
|
version('1.3.1', git=git_url, tag='v1.3.1')
|
||||||
|
|
||||||
|
# TODO: Implement this by following the instructions at this location:
|
||||||
|
# https://github.com/github/git-lfs/blob/master/CONTRIBUTING.md#building
|
||||||
|
# variant('test', default=True, description='Build and run tests as part of the build.') # NOQA: E501
|
||||||
|
|
||||||
depends_on('go@1.5:', type='build')
|
depends_on('go@1.5:', type='build')
|
||||||
depends_on('git@1.8.2:', type='run')
|
depends_on('git@1.8.2:', type='run')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
bootstrap = Executable('./scripts/bootstrap')
|
bootstrap_script = Executable(join_path('script', 'bootstrap'))
|
||||||
bootstrap()
|
bootstrap_script()
|
||||||
install('bin/git-lfs', prefix.bin)
|
|
||||||
|
mkdirp(prefix.bin)
|
||||||
|
install(join_path('bin', 'git-lfs'), prefix.bin)
|
||||||
|
|||||||
@@ -1,3 +1,27 @@
|
|||||||
|
##############################################################################
|
||||||
|
# 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
|
||||||
|
##############################################################################
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import glob
|
import glob
|
||||||
@@ -17,25 +41,37 @@ class GoBootstrap(Package):
|
|||||||
|
|
||||||
extendable = True
|
extendable = True
|
||||||
|
|
||||||
# temporary fix until tags are pulled correctly
|
# NOTE: Go@1.4.2 is the only supported bootstrapping compiler because all
|
||||||
|
# later versions require a Go compiler to build.
|
||||||
|
# See: https://golang.org/doc/install/source
|
||||||
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
|
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
|
||||||
|
|
||||||
variant('test',
|
variant('test', default=True, description='Build and run tests as part of the build.')
|
||||||
default=True,
|
|
||||||
description="Run tests as part of build, a good idea but quite"
|
|
||||||
" time consuming")
|
|
||||||
|
|
||||||
provides('golang@:1.4.2')
|
provides('golang@:1.4.2')
|
||||||
|
|
||||||
depends_on('git')
|
depends_on('git', type='alldeps')
|
||||||
|
|
||||||
|
# NOTE: Older versions of Go attempt to download external files that have
|
||||||
|
# since been moved while running the test suite. This patch modifies the
|
||||||
|
# test files so that these tests don't cause false failures.
|
||||||
|
# See: https://github.com/golang/go/issues/15694
|
||||||
|
@when('@:1.4.3')
|
||||||
|
def patch(self):
|
||||||
|
test_suite_file = FileFilter(join_path('src', 'run.bash'))
|
||||||
|
test_suite_file.filter(
|
||||||
|
r'^(.*)(\$GOROOT/src/cmd/api/run.go)(.*)$',
|
||||||
|
r'# \1\2\3',
|
||||||
|
)
|
||||||
|
|
||||||
|
@when('@1.5.0:')
|
||||||
|
def patch(self):
|
||||||
|
pass
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
bash = which('bash')
|
bash = which('bash')
|
||||||
with working_dir('src'):
|
with working_dir('src'):
|
||||||
if '+test' in spec:
|
bash('{0}.bash'.format('all' if '+test' in spec else 'make'))
|
||||||
bash('all.bash')
|
|
||||||
else:
|
|
||||||
bash('make.bash')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.makedirs(prefix)
|
os.makedirs(prefix)
|
||||||
|
|||||||
@@ -1,3 +1,27 @@
|
|||||||
|
##############################################################################
|
||||||
|
# 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
|
||||||
|
##############################################################################
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import glob
|
import glob
|
||||||
@@ -12,28 +36,39 @@ class Go(Package):
|
|||||||
|
|
||||||
extendable = True
|
extendable = True
|
||||||
|
|
||||||
version('1.5.4', git='https://go.googlesource.com/go', tag='go1.5.4')
|
|
||||||
version('1.6.2', git='https://go.googlesource.com/go', tag='go1.6.2')
|
version('1.6.2', git='https://go.googlesource.com/go', tag='go1.6.2')
|
||||||
|
version('1.5.4', git='https://go.googlesource.com/go', tag='go1.5.4')
|
||||||
|
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
|
||||||
|
|
||||||
variant('test',
|
variant('test', default=True, description='Build and run tests as part of the build.')
|
||||||
default=True,
|
|
||||||
description="Run tests as part of build, a good idea but quite"
|
|
||||||
" time consuming")
|
|
||||||
|
|
||||||
provides('golang')
|
provides('golang')
|
||||||
|
|
||||||
# to-do, make non-c self-hosting compilers feasible without backflips
|
depends_on('git', type='alldeps')
|
||||||
|
# TODO: Make non-c self-hosting compilers feasible without backflips
|
||||||
# should be a dep on external go compiler
|
# should be a dep on external go compiler
|
||||||
depends_on('go-bootstrap', type='build')
|
depends_on('go-bootstrap', type='build')
|
||||||
depends_on('git', type='alldeps')
|
|
||||||
|
# NOTE: Older versions of Go attempt to download external files that have
|
||||||
|
# since been moved while running the test suite. This patch modifies the
|
||||||
|
# test files so that these tests don't cause false failures.
|
||||||
|
# See: https://github.com/golang/go/issues/15694
|
||||||
|
@when('@:1.4.3')
|
||||||
|
def patch(self):
|
||||||
|
test_suite_file = FileFilter(join_path('src', 'run.bash'))
|
||||||
|
test_suite_file.filter(
|
||||||
|
r'^(.*)(\$GOROOT/src/cmd/api/run.go)(.*)$',
|
||||||
|
r'# \1\2\3',
|
||||||
|
)
|
||||||
|
|
||||||
|
@when('@1.5.0:')
|
||||||
|
def patch(self):
|
||||||
|
pass
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
bash = which('bash')
|
bash = which('bash')
|
||||||
with working_dir('src'):
|
with working_dir('src'):
|
||||||
if '+test' in spec:
|
bash('{0}.bash'.format('all' if '+test' in spec else 'make'))
|
||||||
bash('all.bash')
|
|
||||||
else:
|
|
||||||
bash('make.bash')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.makedirs(prefix)
|
os.makedirs(prefix)
|
||||||
|
|||||||
Reference in New Issue
Block a user