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
d13bbeb6
Commit
d13bbeb6
authored
10 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Add PYTOHNPATH to modules for python extensions.
parent
bcccf020
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
+8
-0
8 additions, 0 deletions
lib/spack/spack/modules.py
with
8 additions
and
0 deletions
lib/spack/spack/modules.py
+
8
−
0
View file @
d13bbeb6
...
...
@@ -49,6 +49,7 @@
import
re
import
textwrap
import
shutil
from
glob
import
glob
from
contextlib
import
closing
import
llnl.util.tty
as
tty
...
...
@@ -123,6 +124,13 @@ def add_path(path_name, directory):
if
os
.
path
.
isdir
(
directory
):
add_path
(
var
,
directory
)
# Add python path unless it's an actual python installation
# TODO: is there a better way to do this?
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
])
# short description is just the package + version
# TODO: maybe packages can optionally provide it.
self
.
short_description
=
self
.
spec
.
format
(
"
$_ $@
"
)
...
...
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