Skip to content

Commit 6a9b35a

Browse files
committed
Update python3 branch. Refs #311
1 parent 993507f commit 6a9b35a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

readthedocs/projects/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@
8989
# detect all available Python interpreters in the fly (Maybe using
9090
# update-alternatives linux tool family?).
9191
PYTHON_CHOICES = (
92-
('python', _('Python')),
92+
('python', _('Python 2.x')),
9393
('python3', _('Python 3.x')),
9494
)

readthedocs/projects/tasks.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def update_imported_docs(version_pk):
304304
# interpreters.
305305
update_docs_output['venv'] = run('{cmd} --distribute {site_packages} {path}'.format(
306306
cmd='{interpreter} -m virtualenv'.format(
307-
interpreter=project.python_version),
307+
interpreter=project.python_interpreter),
308308
site_packages=site_packages,
309309
path=project.venv_path(version=version_slug)))
310310
# Other code expects sphinx-build to be installed inside the virtualenv.
@@ -314,7 +314,12 @@ def update_imported_docs(version_pk):
314314
ignore_option = '-I'
315315
else:
316316
ignore_option = ''
317-
update_docs_output['sphinx'] = run('{cmd} install -U {ignore_option} hg+http://bitbucket.org/birkenfeld/sphinx/@d4c6ac1fcc9c#egg=Sphinx virtualenv==1.8.2 distribute==0.6.28 docutils==0.8.1'.format(
317+
if project.python_interpreter != 'python3':
318+
update_docs_output['sphinx'] = run('{cmd} install -U {ignore_option} hg+http://bitbucket.org/birkenfeld/sphinx/@d4c6ac1fcc9c#egg=Sphinx virtualenv==1.8.2 distribute==0.6.28 docutils==0.8.1'.format(
319+
cmd=project.venv_bin(version=version_slug, bin='pip'), ignore_option=ignore_option))
320+
else:
321+
# python 3 specific hax
322+
update_docs_output['sphinx'] = run('{cmd} install {ignore_option} hg+http://bitbucket.org/birkenfeld/sphinx/@d4c6ac1fcc9c#egg=Sphinx virtualenv==1.8.2 docutils==0.8.1'.format(
318323
cmd=project.venv_bin(version=version_slug, bin='pip'), ignore_option=ignore_option))
319324

320325
if project.requirements_file:

0 commit comments

Comments
 (0)