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
d5e9279c
Commit
d5e9279c
authored
9 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Plain Diff
Merge pull request #215 from sjtbham/develop
fix build to work against depends for modules created by setup.py and…
parents
dccfcd10
aa137d8b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
var/spack/packages/python/package.py
+18
-3
18 additions, 3 deletions
var/spack/packages/python/package.py
with
18 additions
and
3 deletions
var/spack/packages/python/package.py
+
18
−
3
View file @
d5e9279c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
re
import
re
from
contextlib
import
closing
from
contextlib
import
closing
from
llnl.util.lang
import
match_predicate
from
llnl.util.lang
import
match_predicate
from
spack.util.environment
import
*
from
spack
import
*
from
spack
import
*
import
spack
import
spack
...
@@ -16,22 +17,33 @@ class Python(Package):
...
@@ -16,22 +17,33 @@ class Python(Package):
version
(
'
2.7.8
'
,
'
d235bdfa75b8396942e360a70487ee00
'
)
version
(
'
2.7.8
'
,
'
d235bdfa75b8396942e360a70487ee00
'
)
version
(
'
2.7.10
'
,
'
c685ef0b8e9f27b5e3db5db12b268ac6
'
)
version
(
'
2.7.10
'
,
'
c685ef0b8e9f27b5e3db5db12b268ac6
'
)
version
(
'
3.5.0
'
,
'
d149d2812f10cbe04c042232e7964171
'
)
depends_on
(
"
openssl
"
)
depends_on
(
"
openssl
"
)
depends_on
(
"
bzip2
"
)
depends_on
(
"
bzip2
"
)
depends_on
(
"
readline
"
)
depends_on
(
"
readline
"
)
depends_on
(
"
ncurses
"
)
depends_on
(
"
ncurses
"
)
depends_on
(
"
sqlite
"
)
depends_on
(
"
sqlite
"
)
depends_on
(
"
zlib
"
)
def
install
(
self
,
spec
,
prefix
):
def
install
(
self
,
spec
,
prefix
):
# Need this to allow python build to find the Python installation.
# Need this to allow python build to find the Python installation.
env
[
'
PYTHONHOME
'
]
=
prefix
env
[
'
PYTHONHOME
'
]
=
prefix
env
[
'
MACOSX_DEPLOYMENT_TARGET
'
]
=
'
10.6
'
env
[
'
MACOSX_DEPLOYMENT_TARGET
'
]
=
'
10.6
'
# Rest of install is pretty standard.
# Rest of install is pretty standard except setup.py needs to be able to read the CPPFLAGS
# and LDFLAGS as it scans for the library and headers to build
configure
(
"
--prefix=%s
"
%
prefix
,
configure
(
"
--prefix=%s
"
%
prefix
,
"
--with-threads
"
,
"
--with-threads
"
,
"
--enable-shared
"
)
"
--enable-shared
"
,
"
CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include
"
%
(
spec
[
'
openssl
'
].
prefix
,
spec
[
'
bzip2
'
].
prefix
,
spec
[
'
readline
'
].
prefix
,
spec
[
'
ncurses
'
].
prefix
,
spec
[
'
sqlite
'
].
prefix
,
spec
[
'
zlib
'
].
prefix
),
"
LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib
"
%
(
spec
[
'
openssl
'
].
prefix
,
spec
[
'
bzip2
'
].
prefix
,
spec
[
'
readline
'
].
prefix
,
spec
[
'
ncurses
'
].
prefix
,
spec
[
'
sqlite
'
].
prefix
,
spec
[
'
zlib
'
].
prefix
))
make
()
make
()
make
(
"
install
"
)
make
(
"
install
"
)
...
@@ -63,7 +75,10 @@ def setup_dependent_environment(self, module, spec, ext_spec):
...
@@ -63,7 +75,10 @@ def setup_dependent_environment(self, module, spec, ext_spec):
python(
'
setup.py
'
,
'
install
'
,
'
--prefix=%s
'
% prefix)
python(
'
setup.py
'
,
'
install
'
,
'
--prefix=%s
'
% prefix)
"""
"""
# Python extension builds can have a global python executable function
# Python extension builds can have a global python executable function
module
.
python
=
Executable
(
join_path
(
spec
.
prefix
.
bin
,
'
python
'
))
if
self
.
version
>=
Version
(
"
3.0.0
"
)
and
self
.
version
<
Version
(
"
4.0.0
"
):
module
.
python
=
Executable
(
join_path
(
spec
.
prefix
.
bin
,
'
python3
'
))
else
:
module
.
python
=
Executable
(
join_path
(
spec
.
prefix
.
bin
,
'
python
'
))
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
module
.
python_lib_dir
=
os
.
path
.
join
(
ext_spec
.
prefix
,
self
.
python_lib_dir
)
module
.
python_lib_dir
=
os
.
path
.
join
(
ext_spec
.
prefix
,
self
.
python_lib_dir
)
...
...
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