summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/git-top-level/package.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-07-18 20:10:46 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2018-07-25 23:10:10 -0700
commit498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27 (patch)
tree7efbdb612705017cf323651bad48fe534da6bec4 /var/spack/repos/builtin.mock/packages/git-top-level/package.py
parent5792a805fc0a3867df30f14234e62a983cb0d395 (diff)
downloadspack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.tar.gz
spack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.tar.bz2
spack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.tar.xz
spack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.zip
core: fixes and tests for handling of fetcher attributes in packages
- Packages can remove the top-level `url` attribute and still work - These are now legal: - Packages with *only* version-specific URLs (even with gaps) - Packages with a top-level git/hg/svn attribute and `version` directives for that. - If a package has both a top-level hg/git/svn attribute AND a top-level url attribute, the url attribute takes precedence.
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/git-top-level/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/git-top-level/package.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/git-top-level/package.py b/var/spack/repos/builtin.mock/packages/git-top-level/package.py
new file mode 100644
index 0000000000..5c0be81101
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/git-top-level/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2018, 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/spack/spack
+# Please also see the NOTICE and LICENSE files 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 *
+
+
+class GitTopLevel(Package):
+ """Mock package that uses git for fetching."""
+ homepage = "http://www.git-fetch-example.com"
+
+ git = 'https://example.com/some/git/repo'
+ version('1.0')
+
+ def install(self, spec, prefix):
+ pass