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
ec855df0
Commit
ec855df0
authored
8 years ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
Updated python: account for lib64 when filtering compilers.
parent
58cb2cc2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
var/spack/repos/builtin/packages/python/package.py
+16
-20
16 additions, 20 deletions
var/spack/repos/builtin/packages/python/package.py
with
16 additions
and
20 deletions
var/spack/repos/builtin/packages/python/package.py
+
16
−
20
View file @
ec855df0
...
...
@@ -132,19 +132,17 @@ def install(self, spec, prefix):
make
()
make
(
'
install
'
)
self
.
filter_compilers
(
spec
,
prefix
)
self
.
filter_compilers
(
prefix
)
# TODO:
# On OpenSuse 13, python uses <prefix>/lib64/python2.7/lib-dynload/*.so
# instead of <prefix>/lib/python2.7/lib-dynload/*.so. Oddly enough the
# result is that Python can not find modules like cPickle. A workaround
# for now is to symlink to `lib`:
src
=
os
.
path
.
join
(
prefix
,
'
lib64
'
,
src
=
os
.
path
.
join
(
prefix
.
lib64
,
'
python{0}
'
.
format
(
self
.
version
.
up_to
(
2
)),
'
lib-dynload
'
)
dst
=
os
.
path
.
join
(
prefix
,
'
lib
'
,
dst
=
os
.
path
.
join
(
prefix
.
lib
,
'
python{0}
'
.
format
(
self
.
version
.
up_to
(
2
)),
'
lib-dynload
'
)
if
os
.
path
.
isdir
(
src
)
and
not
os
.
path
.
isdir
(
dst
):
...
...
@@ -174,7 +172,7 @@ def install(self, spec, prefix):
# >>> import Tkinter
# >>> Tkinter._test()
def
filter_compilers
(
self
,
spec
,
prefix
):
def
filter_compilers
(
self
,
prefix
):
"""
Run after install to tell the configuration files and Makefiles
to use the compilers that Spack built the package with.
...
...
@@ -184,23 +182,21 @@ def filter_compilers(self, spec, prefix):
kwargs
=
{
'
ignore_absent
'
:
True
,
'
backup
'
:
False
,
'
string
'
:
True
}
dirname
=
join_path
(
prefix
.
lib
,
'
python{0}
'
.
format
(
self
.
version
.
up_to
(
2
)))
lib_dirnames
=
[
join_path
(
lib_dir
,
'
python{0}
'
.
format
(
self
.
version
.
up_to
(
2
)))
for
lib_dir
in
[
prefix
.
lib
,
prefix
.
lib64
]]
config
=
'
config
'
if
spec
.
satisfies
(
'
@3:
'
):
config
=
'
config-{0}m
'
.
format
(
self
.
version
.
up_to
(
2
))
config_dirname
=
'
config-{0}m
'
.
format
(
self
.
version
.
up_to
(
2
))
if
self
.
spec
.
satisfies
(
'
@3:
'
)
else
'
config
'
files
=
[
'
_sysconfigdata.py
'
,
join_path
(
config
,
'
Makefile
'
)
]
rel_filenames
=
[
'
_sysconfigdata.py
'
,
join_path
(
config_dirname
,
'
Makefile
'
)]
abs_filenames
=
[
join_path
(
dirname
,
filename
)
for
dirname
in
lib_dirnames
for
filename
in
rel_filenames
]
for
filename
in
files
:
filter_file
(
env
[
'
CC
'
],
self
.
compiler
.
cc
,
join_path
(
dirname
,
filename
),
**
kwargs
)
filter_file
(
env
[
'
CXX
'
],
self
.
compiler
.
cxx
,
join_path
(
dirname
,
filename
),
**
kwargs
)
filter_file
(
env
[
'
CC
'
],
self
.
compiler
.
cc
,
*
abs_filenames
,
**
kwargs
)
filter_file
(
env
[
'
CXX
'
],
self
.
compiler
.
cxx
,
*
abs_filenames
,
**
kwargs
)
# ========================================================================
# Set up environment to make install easy for python extensions.
...
...
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