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
b27f4e3a
Commit
b27f4e3a
authored
8 years ago
by
Elizabeth Fischer
Committed by
Todd Gamblin
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
py-matplotlib: Add variants for optional dependencies. (#2008)
parent
67ef6df4
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
var/spack/repos/builtin/packages/py-matplotlib/package.py
+42
-21
42 additions, 21 deletions
var/spack/repos/builtin/packages/py-matplotlib/package.py
with
42 additions
and
21 deletions
var/spack/repos/builtin/packages/py-matplotlib/package.py
+
42
−
21
View file @
b27f4e3a
...
...
@@ -38,36 +38,51 @@ class PyMatplotlib(Package):
version
(
'
1.4.3
'
,
'
86af2e3e3c61849ac7576a6f5ca44267
'
)
version
(
'
1.4.2
'
,
'
7d22efb6cce475025733c50487bd8898
'
)
variant
(
'
gui
'
,
default
=
False
,
description
=
'
Enable GUI
'
)
# See: http://matplotlib.org/users/installing.html
# Variants enabled by default for a standard configuration
variant
(
'
tk
'
,
default
=
True
,
description
=
'
Enable Tk GUI
'
)
variant
(
'
image
'
,
default
=
True
,
description
=
'
Enable reading/saving JPEG, BMP and TIFF files
'
)
# Variants optionally available to user
variant
(
'
ipython
'
,
default
=
False
,
description
=
'
Enable ipython support
'
)
variant
(
'
qt
'
,
default
=
False
,
description
=
'
Enable Qt GUI
'
)
variant
(
'
latex
'
,
default
=
False
,
description
=
'
Enable LaTeX text rendering support
'
)
variant
(
'
animation
'
,
default
=
False
,
description
=
'
Enable animation support
'
)
# Python 2.7, 3.4, or 3.5
extends
(
'
python
'
,
ignore
=
r
'
bin/nosetests.*$|bin/pbr$
'
)
# Required dependencies
depends_on
(
'
py-numpy@1.6:
'
,
type
=
nolink
)
depends_on
(
'
py-setuptools
'
,
type
=
'
build
'
)
depends_on
(
'
py-dateutil@1.1:
'
,
type
=
nolink
)
depends_on
(
'
py-pyparsing
'
,
type
=
nolink
)
# ------ Required dependencies
depends_on
(
'
py-setuptools
'
,
type
=
'
build
'
)
depends_on
(
'
libpng@1.2:
'
)
depends_on
(
'
py-pytz
'
,
type
=
nolink
)
depends_on
(
'
freetype@2.3:
'
)
depends_on
(
'
py-cycler@0.9:
'
,
type
=
nolink
)
# Optional GUI framework
depends_on
(
'
tk@8.3:
'
,
when
=
'
+gui
'
)
# not 8.6.0 or 8.6.1
depends_on
(
'
qt
'
,
when
=
'
+gui
'
)
depends_on
(
'
py-pyside
'
,
when
=
'
+gui
'
,
type
=
nolink
)
# TODO: Add more GUI dependencies
depends_on
(
'
py-numpy@1.6:
'
,
type
=
nolink
)
depends_on
(
'
py-dateutil@1.1:
'
,
type
=
nolink
)
depends_on
(
'
py-pyparsing
'
,
type
=
nolink
)
depends_on
(
'
py-pytz
'
,
type
=
nolink
)
depends_on
(
'
py-cycler@0.9:
'
,
type
=
nolink
)
# ------ Optional GUI frameworks
depends_on
(
'
tk@8.3:
'
,
when
=
'
+tk
'
)
# not 8.6.0 or 8.6.1
depends_on
(
'
qt
'
,
when
=
'
+qt
'
)
depends_on
(
'
py-pyside
'
,
when
=
'
+qt
'
,
type
=
nolink
)
# Optional external programs
#
---------
Optional external programs
# ffmpeg/avconv or mencoder
depends_on
(
'
ImageMagick
'
)
depends_on
(
'
ImageMagick
'
,
when
=
'
+animation
'
)
# Optional dependencies
depends_on
(
'
p
y-pillow
'
,
type
=
nolink
)
depends_on
(
'
p
kg-config
'
,
type
=
'
build
'
)
#
---------
Optional dependencies
depends_on
(
'
p
kg-config
'
,
type
=
'
build
'
)
# why not...
depends_on
(
'
p
y-pillow
'
,
when
=
'
+image
'
,
type
=
nolink
)
depends_on
(
'
py-ipython
'
,
when
=
'
+ipython
'
)
depends_on
(
'
ghostscript
'
,
when
=
'
+latex
'
,
type
=
'
run
'
)
depends_on
(
'
texlive
'
,
when
=
'
+latex
'
,
type
=
'
run
'
)
# Testing dependencies
depends_on
(
'
py-nose
'
)
# type='test'
...
...
@@ -83,7 +98,7 @@ def install(self, spec, prefix):
setup_py
(
'
build
'
)
setup_py
(
'
install
'
,
'
--prefix={0}
'
.
format
(
prefix
))
if
'
+
gui
'
in
spec
:
if
'
+
qt
'
in
spec
or
'
+tk
'
in
spec
:
# Set backend in matplotlib configuration file
config_file
=
None
for
p
,
d
,
f
in
os
.
walk
(
prefix
.
lib
):
...
...
@@ -95,5 +110,11 @@ def install(self, spec, prefix):
kwargs
=
{
'
ignore_absent
'
:
False
,
'
backup
'
:
False
,
'
string
'
:
False
}
rc
=
FileFilter
(
config_file
)
rc
.
filter
(
'
^backend.*
'
,
'
backend : Qt4Agg
'
,
**
kwargs
)
rc
.
filter
(
'
^#backend.qt4.*
'
,
'
backend.qt4 : PySide
'
,
**
kwargs
)
# Only make Qt4 be the default backend if Tk is turned off
if
'
+qt
'
in
spec
and
'
+tk
'
not
in
spec
:
rc
.
filter
(
'
^backend.*
'
,
'
backend : Qt4Agg
'
,
**
kwargs
)
# Additional options in case user is doing Qt4:
if
'
+qt
'
in
spec
:
rc
.
filter
(
'
^#backend.qt4.*
'
,
'
backend.qt4 : PySide
'
,
**
kwargs
)
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