Skip to content

Enable local doc building without git installation #13015

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 2 commits into from
Jan 14, 2019

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Dec 18, 2018

This just uses the version that versioneer gives Matplotlib. This should be a 1:1 mapping between commits and version numbers (my local build gives Doc version 3.0.2.post1037.dev0+g0fec7f1c3.).

Fixes #13013

@dstansby dstansby added this to the v3.0.3 milestone Dec 18, 2018
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done this way so that the you can build the docs of a released version of matplotlib (which will report as the tag name) but still capture what the commit the docs were built off of was.

For example, the currently published docs report "Doc version v3.0.2-2-g91e2d00a8" but with this change would report just 'v3.0.2'.

@dstansby
Copy link
Member Author

Ah fair enough, maybe adding a try/except block to the git command would work instead?

@tacaswell
Copy link
Member

I think the best fix would be to replicate part of versioneer and use the git export templating, a quick fix would be to put the subprocess call in a try..except block and fallback to using matplotlib.__version__.

@tacaswell
Copy link
Member

Our last two comments passed in the ether, looks like try...except is the winner.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see how this could have caused the ttc failure...

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis failure is #13137 and unrelated to this PR.

@timhoffm timhoffm merged commit d12be50 into matplotlib:master Jan 14, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 14, 2019
tacaswell added a commit that referenced this pull request Jan 14, 2019
…015-on-v3.0.x

Backport PR #13015 on branch v3.0.x (Enable local doc building without git installation)
@dstansby dstansby deleted the doc-build-git branch January 14, 2019 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants