-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
WIP: testing on windows and conda packages/ wheels for master #5604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
87c968b
Do not run Windows' file system convert tool
cgohlke a30ec66
On Windows, initialize the animation.convert_path setting from the Re…
cgohlke 94d9075
BLD: add conda patch to generate a version file
jankatins 3aa9eed
BLD: Include conda dirs in basedir
jankatins d53f902
BLD: Add a way to influence basedirs with env vars
jankatins 659ce45
BLD: use patched bdist_wheel
jankatins 5a7e3b4
CI: test in windows and build packages
jankatins aa4d19c
BLD: Cleanup env vars after basedir change
jankatins 5ac3044
BLD: also find newer freetype
jankatins da4a603
BLD: Find tcl/tk on conda windows
jankatins 99e71f7
CI: Enable tk again
jankatins cdca879
CI: move travis files to one directory under ci
jankatins 52a198e
CI: make result_images available on appveyor
jankatins 1179df7
TST: workaround for windows
jankatins b32f9c1
CI: enable py3.5 builds on windows and switch to NP1.10
jankatins ec6330b
Merge remote-tracking branch 'origin/pr/5460' into HEAD
jankatins 1d1660f
TST: better workaround for NamedTempfile problem on windows
jankatins 14fcb76
CI: use default env vars on py35
jankatins 3d942f7
CI: replace the run_with_env.cmd script
jankatins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
On Windows, initialize the animation.convert_path setting from the Re…
…gistry
- Loading branch information
commit a30ec664e39c27feaef595d2d81046222ec9afee
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
from matplotlib.cbook import iterable, is_string_like | ||
from matplotlib.compat import subprocess | ||
from matplotlib import verbose | ||
from matplotlib import rcParams | ||
from matplotlib import rcParams, rcParamsDefault | ||
|
||
# Process creation flag for subprocess to prevent it raising a terminal | ||
# window. See for example: | ||
|
@@ -262,9 +262,7 @@ def isAvailable(cls): | |
Check to see if a MovieWriter subclass is actually available by | ||
running the commandline tool. | ||
''' | ||
if platform.system() == 'Windows' and cls.bin_path() == 'convert': | ||
# On Windows, the full path to convert must be specified in | ||
# matplotlibrc since convert is also the name of a system tool. | ||
if not cls.bin_path(): | ||
return False | ||
try: | ||
p = subprocess.Popen(cls.bin_path(), | ||
|
@@ -549,6 +547,27 @@ def delay(self): | |
def output_args(self): | ||
return [self.outfile] | ||
|
||
@classmethod | ||
def _init_from_registry(cls): | ||
if sys.platform != 'win32' or rcParams[cls.exec_key] != 'convert': | ||
return | ||
from matplotlib.externals.six.moves import winreg | ||
for flag in (0, winreg.KEY_WOW64_32KEY, winreg.KEY_WOW64_64KEY): | ||
try: | ||
hkey = winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE, | ||
'Software\\Imagemagick\\Current', | ||
0, winreg.KEY_QUERY_VALUE | flag) | ||
binpath = winreg.QueryValueEx(hkey, 'BinPath')[0] | ||
winreg.CloseKey(hkey) | ||
binpath += '\\convert.exe' | ||
break | ||
except Exception: | ||
binpath = '' | ||
rcParams[cls.exec_key] = rcParamsDefault[cls.exec_key] = binpath | ||
|
||
|
||
ImageMagickBase._init_from_registry() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a strange addition. I'm not sure why it is necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #5460 for the discussion of this on windows |
||
|
||
|
||
@writers.register('imagemagick') | ||
class ImageMagickWriter(MovieWriter, ImageMagickBase): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't sound very healthy.