summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/create.py5
-rw-r--r--lib/spack/spack/cmd/edit.py5
-rw-r--r--lib/spack/spack/hooks/dotkit.py2
-rw-r--r--var/spack/packages/parmetis/package.py26
4 files changed, 31 insertions, 7 deletions
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index cc2e0dd384..cc9a1342e7 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -36,7 +36,7 @@ import spack.cmd
import spack.cmd.checksum
import spack.package
import spack.url
-import spack.packages as packages
+from spack.util.naming import mod_to_class
import spack.util.crypto as crypto
from spack.util.executable import which
@@ -157,7 +157,6 @@ def create(parser, args):
else:
mkdirp(os.path.dirname(pkg_path))
- class_name = packages.class_name_for_package_name(name)
versions = list(reversed(spack.package.find_versions_of_archive(url)))
archives_to_fetch = 1
@@ -194,7 +193,7 @@ def create(parser, args):
package_template.substitute(
name=name,
configure=guesser.configure,
- class_name=class_name,
+ class_name=mod_to_class(name),
url=url,
versions=make_version_dict(ver_hash_tuples)))
diff --git a/lib/spack/spack/cmd/edit.py b/lib/spack/spack/cmd/edit.py
index fd77e390ee..c96cf75c9b 100644
--- a/lib/spack/spack/cmd/edit.py
+++ b/lib/spack/spack/cmd/edit.py
@@ -30,7 +30,7 @@ import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp
import spack
-import spack.packages as packages
+from spack.util.naming import mod_to_class
description = "Open package files in $EDITOR"
@@ -80,10 +80,9 @@ def edit(parser, args):
"to edit a new file." % name)
else:
mkdirp(os.path.dirname(path))
- class_name = packages.class_name_for_package_name(name)
with closing(open(path, "w")) as pkg_file:
pkg_file.write(
- package_template.substitute(name=name, class_name=class_name))
+ package_template.substitute(name=name, class_name=mod_to_class(name)))
# If everything checks out, go ahead and edit.
spack.editor(path)
diff --git a/lib/spack/spack/hooks/dotkit.py b/lib/spack/spack/hooks/dotkit.py
index f9920e3622..10b7732353 100644
--- a/lib/spack/spack/hooks/dotkit.py
+++ b/lib/spack/spack/hooks/dotkit.py
@@ -28,7 +28,7 @@ import textwrap
import shutil
from contextlib import closing
-from llnl.util.filesystem import join_path
+from llnl.util.filesystem import join_path, mkdirp
import spack
diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py
new file mode 100644
index 0000000000..10a48503b2
--- /dev/null
+++ b/var/spack/packages/parmetis/package.py
@@ -0,0 +1,26 @@
+from spack import *
+
+class Parmetis(Package):
+ """ParMETIS is an MPI-based parallel library that implements a
+ variety of algorithms for partitioning unstructured graphs,
+ meshes, and for computing fill-reducing orderings of sparse
+ matrices."""
+ homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview"
+ url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz"
+
+ versions = { '4.0.3' : 'f69c479586bf6bb7aff6a9bc0c739628', }
+
+ depends_on('mpi')
+
+ def install(self, spec, prefix):
+ cmake(".",
+ '-DGKLIB_PATH=%s/metis/GKlib' % pwd(),
+ '-DMETIS_PATH=%s/metis' % pwd(),
+ '-DSHARED=1',
+ '-DCMAKE_C_COMPILER=mpicc',
+ '-DCMAKE_CXX_COMPILER=mpicxx',
+ '-DSHARED=1',
+ *std_cmake_args)
+
+ make()
+ make("install")