Update make.py #6530

Merged
merged 2 commits into from Jun 13, 2016

Conversation

Projects
None yet
5 participants
Contributor

klonuo commented Jun 3, 2016

Referencing #6527, these changes provide:

  • fix for symlink exception on Windows
  • no need for rebuilding matplotlib from source
@klonuo klonuo Update make.py
Referencing #6527, these changes provide:

 - fix for symlink exception on Windows
 - no need for rebuilding matplotlib from source
e2e6496

mdboom added the needs_review label Jun 3, 2016

Owner

tacaswell commented Jun 3, 2016

@efiring I think this should fix your issue building the docs?

Owner

jenshnielsen commented Jun 3, 2016

Im a bit worried about coping the users default rc file for generating the documentation. This can result in the documentation unintentionally being generated with a non default style. Would it not be better to refactor the code out from setup.py that generates the rc file from the template and call that as part of make.py?

Owner

tacaswell commented Jun 3, 2016

Is this rcparam actually used building the docs or is in just something we serve?

Contributor

klonuo commented Jun 3, 2016

@jenshnielsen is this ok?

--- a/doc/make.py
+++ b/doc/make.py
@@ -38,7 +38,9 @@

 def html(buildername='html'):
     check_build()
-    copy_if_out_of_date('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc')
+    rc = '../lib/matplotlib/mpl-data/matplotlibrc'
+    rc = os.path.exists(rc) and rc or '../matplotlibrc.template'
+    copy_if_out_of_date(rc, '_static/matplotlibrc')
     if small_docs:
         options = "-D plot_formats=png:80"
     else:
Owner

efiring commented Jun 3, 2016

It looks like it is used only here:
http://matplotlib.org/users/customizing.html?highlight=matplotlibrc
in which case it is the template with only the backend specification uncommented. We could always use the template as-is, or we could always start with the template and make the single line modification to select a backend. This would make the docs build independent of the builder's platform, assuming there is a mechanism in place that assures default rcParams when making the plots for the docs.

Contributor

klonuo commented Jun 4, 2016

So I guess we should reference os.path.join(matplotlib._get_data_path(), 'matplotlibrc') instead?

That seems like default config, with only backend set.

Owner

tacaswell commented Jun 4, 2016

@klonuo I think that is correct.

@klonuo klonuo Update make.py
Fallback to default "matplotlibrc" instead user's "matplotlibrc"
070fbff

@jenshnielsen jenshnielsen merged commit 2ac4e88 into matplotlib:master Jun 13, 2016

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.004%) to 69.614%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

mdboom removed the needs_review label Jun 13, 2016

Owner

jenshnielsen commented Jun 13, 2016

@klonuo Thanks

@jenshnielsen jenshnielsen added a commit that referenced this pull request Jun 13, 2016

@jenshnielsen @jenshnielsen jenshnielsen + jenshnielsen Merge pull request #6530 from klonuo/patch-1
Update make.py
96fb3a3
Owner

jenshnielsen commented Jun 13, 2016

backported to 2.x as 96fb3a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment