Skip to content
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

Always build docs with latest theme #541

Closed
wants to merge 5 commits into from
Closed

Always build docs with latest theme #541

wants to merge 5 commits into from

Conversation

Blendify
Copy link
Member

No description provided.

@davidfischer
Copy link
Contributor

I would think that the docs for this theme should be built with the version of theme the docs are for. Let's say we ever have to maintain two concurrent versions (say for Sphinx < 2.0 and Sphinx >= 2.0), we wouldn't want them both to build with the latest master of the theme. Does that make sense?

@Blendify
Copy link
Member Author

Blendify commented Jan 15, 2018 via email

@davidfischer
Copy link
Contributor

I don't think I understand what you're suggesting.

Doesn't this line already handle what you're proposing with this PR?

@Blendify
Copy link
Member Author

Blendify commented Jan 15, 2018 via email

@jessetan
Copy link
Contributor

This already works for me as I would expect on master. The documentation in docs uses the theme as built one directory up.
Is this different from what you are expecting to happen @Blendify ?

@Blendify
Copy link
Member Author

Blendify commented Jan 23, 2018 via email

@jessetan
Copy link
Contributor

jessetan commented Feb 7, 2018

I think it doesn't work on RTD because it checks out the source in a folder named for the branch it's building (e.g. .../user_builds/sphinx-rtfd-theme/checkouts/some-branch), rather than sphinx_rtd_theme. The theme can then not be found by name and the default version installed by RTD will be used.

Rather than add master, you can add -e . to requirements.txt. If the requirements are installed from the point of checkout (sphinx_rtd_theme) using pip install -r docs/requirements.txt, it will install the theme located at sphinx_rtd_theme.
This does not work if the pip install is done from within the docs directory, because oddly the path is resolved from where pip install was called, not from the location of requirements.txt (see pypa/pip#3772)

@Blendify
Copy link
Member Author

Still can't get this to work and its more than just the test. Here is the error:

C:\Users\Aaron\Documents\Projects\Read the Docs\sphinx_rtd_theme>pip install -r requirements.txt --upgrade
Obtaining file:///C:/Users/Aaron/Documents/Projects/Read%20the%20Docs/sphinx_rtd_theme (from -r requirements.txt (line 3))
    Complete output from command python setup.py egg_info:

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Aaron\Documents\Projects\Read the Docs\sphinx_rtd_theme\

@jessetan
Copy link
Contributor

What is your output if you run python setup.py egg_info yourself?

I get:

running egg_info
writing sphinx_rtd_theme.egg-info/PKG-INFO
writing top-level names to sphinx_rtd_theme.egg-info/top_level.txt
writing dependency_links to sphinx_rtd_theme.egg-info/dependency_links.txt
writing entry points to sphinx_rtd_theme.egg-info/entry_points.txt
reading manifest file 'sphinx_rtd_theme.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sphinx_rtd_theme.egg-info/SOURCES.txt'

@Blendify
Copy link
Member Author

Blendify commented Feb 14, 2018 via email

@jessetan
Copy link
Contributor

Have you tried updating pip or setuptools first? Might be a permissions thing otherwise (don't know exactly how that would work on Windows), using a virtualenv should help

@Blendify
Copy link
Member Author

Blendify commented Feb 14, 2018 via email

@agjohnson
Copy link
Collaborator

Installing the package during RTD build is the correct method. You can also get rid of the requirements.txt entirely and just install the dependencies through standard setup.py/setup.cfg mechanics. RTD has an option to install the package as a build step.

Copy link
Collaborator

@agjohnson agjohnson 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 closer to the correct approach. I'd also be +1 on removing the need for requirements.txt -- I don't like using this file on packages. Not a strong requirement here from me though.

@Blendify
Copy link
Member Author

Is there a way to stop RTD from using an installed version of the theme?

@agjohnson agjohnson added this to the v0.4.0 milestone Mar 29, 2018
@agjohnson agjohnson modified the milestones: v0.4.0, 0.5 Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants