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

Use environment file for initial conda env creation. #1947

Merged
merged 6 commits into from
Jan 22, 2016
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions readthedocs/doc_builder/python_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,22 @@ def setup_base(self):
shutil.rmtree(version_path)
self.build_env.run(
'conda',
'env',
'create',
'--yes',
'--name',
self.version.slug,
'python={python_version}'.format(python_version=self.config.python_version),
'--file',
self.config.conda_file,
bin_path=None, # Don't use conda bin that doesn't exist yet
)

def install_core_requirements(self):
conda_env_path = os.path.join(self.project.doc_path, 'conda')

# Use conda for requirements it packages
requirements = [
'sphinx==1.3.1',
'Pygments==2.0.2',
'docutils==0.11',
'mock==1.0.1',
'docutils',
Copy link
Contributor

Choose a reason for hiding this comment

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

Couple of questions. Is it really ok to leave docutils unpinned or should it just be pinned to a newer version like 0.12? Also, should mock really be dropped?

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea of including mock was to let folks mock dependencies, which presumably isn't an issue with conda.

We could also remove docutils entirely, and let Sphinx specify the docutils version. Not sure the best path forward.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, ok. So, you are not dependent on mock. In that case, I agree with you. Also, letting sphinx pull in docutils sounds fine unless you are using it internally somehow.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've gone ahead and pinned it at 0.12 for now, as that's the least disruptive to how everything else works.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to keep nitpicking on this, but if you are concerned about disruption then should the mock constraint simply be left as is?

'pillow==3.0.0',
'sphinx_rtd_theme==0.1.7',
'alabaster>=0.7,<0.8,!=0.7.5',
Expand Down Expand Up @@ -231,7 +230,6 @@ def install_core_requirements(self):
)

def install_user_requirements(self):
conda_env_path = os.path.join(self.project.doc_path, 'conda')
self.build_env.run(
'conda',
'env',
Expand Down