Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
e88df95b
Commit
e88df95b
authored
9 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused code from modules.py
parent
48b35bb4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/modules.py
+10
-20
10 additions, 20 deletions
lib/spack/spack/modules.py
with
10 additions
and
20 deletions
lib/spack/spack/modules.py
+
10
−
20
View file @
e88df95b
...
...
@@ -133,6 +133,7 @@ def __init__(self, spec=None):
if
self
.
spec
.
package
.
__doc__
:
self
.
long_description
=
re
.
sub
(
r
'
\s+
'
,
'
'
,
self
.
spec
.
package
.
__doc__
)
@property
def
category
(
self
):
# Anything defined at the package level takes precedence
...
...
@@ -144,21 +145,6 @@ def category(self):
# Not very descriptive fallback
return
'
spack installed package
'
# @property
# def paths(self):
# # Add python path unless it's an actual python installation
# # TODO : is there a better way to do this?
# # FIXME : add PYTHONPATH to every python package
# if self.spec.name != 'python':
# site_packages = glob(join_path(self.spec.prefix.lib, "python*/site-packages"))
# if site_packages:
# add_path('PYTHONPATH', site_packages[0])
#
# # FIXME : Same for GEM_PATH
# if self.spec.package.extends(spack.spec.Spec('ruby')):
# add_path('GEM_PATH', self.spec.prefix)
#
# return self._paths
def
write
(
self
):
"""
Write out a module file for this object.
"""
...
...
@@ -166,16 +152,20 @@ def write(self):
if
not
os
.
path
.
exists
(
module_dir
):
mkdirp
(
module_dir
)
# Environment modifications guessed by inspecting the installation prefix
# Environment modifications guessed by inspecting the
# installation prefix
env
=
inspect_path
(
self
.
spec
.
prefix
)
# Let the extendee modify their extensions before asking for package-specific modifications
# Let the extendee modify their extensions before asking for
# package-specific modifications
for
extendee
in
self
.
pkg
.
extendees
:
extendee_spec
=
self
.
spec
[
extendee
]
extendee_spec
.
package
.
modify_module
(
self
.
pkg
.
module
,
extendee_spec
,
self
.
spec
)
extendee_spec
.
package
.
modify_module
(
self
.
pkg
.
module
,
extendee_spec
,
self
.
spec
)
# Package-specific environment modifications
self
.
spec
.
package
.
setup_environment
(
env
)
# TODO : implement site-specific modifications and filters
if
not
env
:
return
...
...
@@ -232,7 +222,7 @@ def file_name(self):
def
use_name
(
self
):
return
"
%s-%s-%s-%s-%s
"
%
(
self
.
spec
.
name
,
self
.
spec
.
version
,
self
.
spec
.
compiler
.
name
,
self
.
spec
.
compiler
.
version
,
self
.
spec
.
compiler
.
version
,
self
.
spec
.
dag_hash
())
def
write_header
(
self
,
dk_file
):
...
...
@@ -270,7 +260,7 @@ def file_name(self):
def
use_name
(
self
):
return
"
%s-%s-%s-%s-%s
"
%
(
self
.
spec
.
name
,
self
.
spec
.
version
,
self
.
spec
.
compiler
.
name
,
self
.
spec
.
compiler
.
version
,
self
.
spec
.
compiler
.
version
,
self
.
spec
.
dag_hash
())
def
write_header
(
self
,
module_file
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment